Results 1 to 9 of 9

Thread: connection

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    connection

    This is the connection string that I would like to use to connect to sql 2K
    <add key="ConnectionString" value="server=(local);database=DCTKB;trusted_connection=true"/>

    The error message is:
    Login failed for user 'GBWS-00065768\ASPNET

    In the query analyser I can log on to my local machine which is called GBWS-00065768 using windows authentication
    How can i connect to the database using the above connectionstring?
    Thanks

  2. #2
    Hyperactive Member tailz's Avatar
    Join Date
    Jul 2002
    Posts
    306

    Talking Re: connection

    Had the same problem and I spent ages beating SQL server into submission the other day

    I believe I had to add my user account 'domain\user' under EM>Security>Logins

    You can add groups as well so adding 'domain\administrators' is mebbe what you want

  3. #3
    Hyperactive Member tailz's Avatar
    Join Date
    Jul 2002
    Posts
    306

    Re: connection

    clicked post, THEN thought about the answer.

    I may have just assigned the aspnet user "public" access to my database

    it was definetly summat I clicked in there lol

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    Re: connection

    I have that already.
    Any thoughts?
    Thanks

  5. #5
    Hyperactive Member tailz's Avatar
    Join Date
    Jul 2002
    Posts
    306

    Question Re: connection

    A couple. One involves going to pub.

    The other being, do you have to use that connection string?

    What happens if you use this one;

    data source=(local);initial catalog=DCTKB;integrated security=SSPI;persist security info=False;packet size=4096

  6. #6
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690

    Re: connection

    Have you added the user {DOMAINNAME}\ASPNET in both the instance of SQL Server and the database you wish to access?

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2002
    Location
    London
    Posts
    678

    Re: connection

    Thanks guys.
    The problem was that I had to reset the sql server security to sql as well as windows.

  8. #8
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690

    Re: connection

    heh, I didn't even think of that. FWIW, I guess you can log in as a specific user if you want to, or need to, rather than use integrated and end up being ASPNET.

  9. #9
    Hyperactive Member tailz's Avatar
    Join Date
    Jul 2002
    Posts
    306

    Re: connection

    not a problem, glad I was of no assistance

    beer time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width