ApplicationPoolIdentity IIS 7.5 to SQL Server 2008 R2 not working.
Posted
by
Jack
on Server Fault
See other posts from Server Fault
or by Jack
Published on 2010-12-30T21:24:48Z
Indexed on
2010/12/30
21:56 UTC
Read the original article
Hit count: 279
iis7.5
|application-pools
I have a small ASP.NET test script that opens a connection to a SQL Server database on another machine in the domain. It isn't working in all cases.
Setup:
IIS 7.5 under W2K8R2 trying to connect to a remote SQL Server 2008 R2 instance. All machines are in the same domain.
Using the ApplicationPoolIdentity for the web site it fails to connect to the SQL Server with the following:
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
However if I switch the Process Model Identity to NETWORK SERVICE or my domain account the database connection is successful.
I've granted the \$ access in SQL Server.
I am not doing any sort of authentication on the web site, it is just a simple script to open a connection to a database to make sure it works.
I have Anonymous Authentication enabled and set to use the Application pool identity.
How do I make this work? Why is the ApplicationPoolIdentity trying to use ANONYMOUS LOGON? Better yet, how do I make it stop using the Anonymous logon?
© Server Fault or respective owner