Can't Connect from ASP.NET App

  • We have an ASP.NET app (written with VB.NET 2003) that has been running fine. We recently upgraded some databases from SQL Server 2000 to SQL Server 2008. While doing that, we change the web.config file in our .NET app to point to the new SQL Server. Everything else stayed the same and we are using Windows authentication.

    The only thing we changed in the connection string was the server (data source) name.

    Now when we try to run, we cannot connect because it will not pass our credentials over to the machine.

    The first thing I checked was the Service Principal Names (SPNs). Then I checked the AD settings for both the server and the SQL Server service account. Everything looks to be setup fine (just like all of our other servers).

    When we try to connect to the web server from a different box, we get the following error:

    An error occurred while opening the connection. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

    When we try to run the app directly from the web server, we get the following error:

    An error occurred while executing the SQL statement. Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

    I've seen these errors before so I am usually able to go check a few things and find a mistake in some configuration but I can't find it now. I'm wondering if it has to do with SQL Server 2008.

    Any ideas?

    Thanks,

    hawg

    ----------------------------------------------------------01010011010100010100110000100000010100110110010101110010011101100110010101110010001000000101001001101111011000110110101101110011

  • 1.I Hope your user is not a member in windows group

    or

    2. check the named pipes,sharedmemory,TCP/IP ports enable.

    I think !st one is the reason.

    Thanks

  • What do you mean by "1.I Hope your user is not a member in windows group"?

    ----------------------------------------------------------01010011010100010100110000100000010100110110010101110010011101100110010101110010001000000101001001101111011000110110101101110011

  • Just an update. The problem was a typo in the SPN setup. There was a small piece missing in the domain qualifier.

    I looked at it a million times yesterday. I guess fresh eyes this morning made the difference.

    ----------------------------------------------------------01010011010100010100110000100000010100110110010101110010011101100110010101110010001000000101001001101111011000110110101101110011

  • since u r using windows authentication,your user should be valid windows user to login to the DB.Thats y i told to check whether ur user s a valid windows user.Hope ur problem solved...Thanks.....

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply