My blog has moved!

Visit http://blog.adamroderick.com/ and update your bookmarks.

Thursday, November 13, 2008

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Oooh, I hate seeing this one. There are many situations where this can occur, and I am confident that I am not aware of all of them. But I most often see it on an ASP.NET website, set up to use Windows authentication, with a SQL Server backend.

The simple explanation is that your credentials are lost, and by the time you go through all the layers and reach the SQL Server database, you appear to be an anonymous user. For more detailed explanations, see this article or search the internet for "double hop."

In my case, the problem actually lied with Internet Explorer and not with ASP.NET, IIS, my code, or SQL Server. The site I was trying to access was listed in my "Trusted Sites Zone" (see Tools > Internet Options > Security Tab). Sites under the Trusted Sites Zone do not pass windows credentials correctly. You should have any sites that use windows authentication either in the Intranet Zone or on the same domain of your client machine.

Adding my site to the Intranet Zone allowed the browser to correctly pass my windows credentials all the way through to SQL Server, and I had no more errors about anonymous logons.

Labels: , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home