Connection string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ankur30884
    New Member
    • Sep 2007
    • 7

    Connection string

    i m usign visual studio 2005 with sql 2005 my site work perfect on test time on my computer but when i publish it it can't work at database use, all other process working but database releated procedure not wroking

    this is my connection string in web.config file
    <connectionStri ngs>
    <add name="PassportP R" connectionStrin g="Data Source=.\SQLEXP RESS;AttachDbFi lename=|DataDir ectory|\Authe.m df;Integrated Security=True;U ser Instance=True"
    providerName="S ystem.Data.SqlC lient" />
    </connectionStrin gs>

    please help me
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Welcome to TSDN. Here is a page that may help:
    SQL Server 2005

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      It sounds like you are getting an invalid login rejection.
      When using that type of login, you are using you windows credentials to log into the database.
      The user that is used depends on the system. Sometimes it's ASPNET and sometimes its IIUSER_(compute rname) and sometimes it will try to authenticate as the COMPUTER itself and not as a user.

      You will need to find out what it's trying to AUTH as make sure that user has the correct privleges for the SQL server AND the filesystem to get to that mdf you have attached to it. (which I hope that directory path you gave is valid for both computers)

      Comment

      • ankur30884
        New Member
        • Sep 2007
        • 7

        #4
        Originally posted by Plater
        It sounds like you are getting an invalid login rejection.
        When using that type of login, you are using you windows credentials to log into the database.
        The user that is used depends on the system. Sometimes it's ASPNET and sometimes its IIUSER_(compute rname) and sometimes it will try to authenticate as the COMPUTER itself and not as a user.

        You will need to find out what it's trying to AUTH as make sure that user has the correct privleges for the SQL server AND the filesystem to get to that mdf you have attached to it. (which I hope that directory path you gave is valid for both computers)

        Hi Plater
        Thanks for your suggetion, as your answer the problem in sql server login, but here i does not create any login for my database from sql server, i m using dob user to use my database in my site, i am using the in bulit sql express editon of micrsoft sql server 2005 with visual studio. there is no concept of login it was auto connect with my site when i create this database from visual studio 2005 using new file option.

        and thanks your replay. please help me.....

        Comment

        • Shashi Sadasivan
          Recognized Expert Top Contributor
          • Aug 2007
          • 1435

          #5
          this most probably means you were connecting to sql express using windows authentication.

          And i will presume (do get back if it is wrong) that your sql express erver and your development environment was the same machine.

          So you would need to set up the authentication to be accessed by all in sql server.

          Try installing the sql management studio on another machine and connect to your server remotely.

          this would get you going

          cheers

          Comment

          • ankur30884
            New Member
            • Sep 2007
            • 7

            #6
            Originally posted by Shashi Sadasivan
            this most probably means you were connecting to sql express using windows authentication.

            And i will presume (do get back if it is wrong) that your sql express erver and your development environment was the same machine.

            So you would need to set up the authentication to be accessed by all in sql server.

            Try installing the sql management studio on another machine and connect to your server remotely.

            this would get you going

            cheers


            Hi Shashi Sadasivan
            Thanks yar
            but there is a also problem we are using Windows XP SP2, and there is some problem to connect remote server........


            any way thanks dear
            u r tipp also help full me

            Comment

            Working...