Not associated with a trusted SQL Server connection

Discussion in 'ASP .Net Security' started by vlad, Aug 19, 2003.

  1. vlad

    vlad Guest

    We are running SQL server 2000 on MS Windows Server 2000. We have web based
    database (ASP.net and SQL Server 2000). When I run this page with 'sa'
    account, It works but when I change it to Window autointoxication I am
    getting the following error massage.
    Login failed for user '(null)'. Reason: Not associated with a trusted SQL
    Server connection.
    I don't want to use 'sa' account. Please let me know how to solve this
    problem.
    vlad, Aug 19, 2003
    #1
    1. Advertising

  2. Hello vlad !

    Try to search for "impersonation" in the web.config, its responsible for the
    behaviour of SQL Server and your Web Server.

    Jens Süßmeyer


    "vlad" <> schrieb im Newsbeitrag
    news:...
    > We are running SQL server 2000 on MS Windows Server 2000. We have web

    based
    > database (ASP.net and SQL Server 2000). When I run this page with 'sa'
    > account, It works but when I change it to Window autointoxication I am
    > getting the following error massage.
    > Login failed for user '(null)'. Reason: Not associated with a trusted SQL
    > Server connection.
    > I don't want to use 'sa' account. Please let me know how to solve this
    > problem.
    >
    >
    Jens Süßmeyer, Aug 19, 2003
    #2
    1. Advertising

  3. The other poster recommended impersonation. However a few 'Gotchya' there
    1) The requesting user must have authenticated on the web server before the
    SQL request
    2) This prevents using connection pooling as the connection string changes,
    and therefore slows execution
    3) The calling user must be an user on the SQL Box.

    I suggest that you add ASPNET as a user on the SQL Box, set the permissions
    to what the server will need, and use that account. This side steps the
    issues above.

    Tom
    --
    ==========================================
    = Tom Vande Stouwe MCSD.net, MCAD.net, MCP
    = 45Wallstreet.com (www.45wallstreet.com)
    = (803)-345-5001
    ==========================================
    = If you are not making any mistakes
    ..= ..you are not trying hard enough.
    ==========================================
    "vlad" <> wrote in message
    news:...
    > We are running SQL server 2000 on MS Windows Server 2000. We have web

    based
    > database (ASP.net and SQL Server 2000). When I run this page with 'sa'
    > account, It works but when I change it to Window autointoxication I am
    > getting the following error massage.
    > Login failed for user '(null)'. Reason: Not associated with a trusted SQL
    > Server connection.
    > I don't want to use 'sa' account. Please let me know how to solve this
    > problem.
    >
    >
    Tom Vande Stouwe MCSD.net, Aug 20, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Blake Versiga
    Replies:
    2
    Views:
    19,775
    Yan-Hong Huang[MSFT]
    Jul 9, 2003
  2. vlad
    Replies:
    3
    Views:
    3,396
  3. Frederik
    Replies:
    0
    Views:
    1,415
    Frederik
    Nov 25, 2003
  4. Frederik
    Replies:
    2
    Views:
    5,501
  5. rrober07
    Replies:
    4
    Views:
    6,163
    rrober07
    Dec 23, 2003
Loading...

Share This Page