S
Scott Elgram
Hello,
I am trying to create a site using integrated windows authentication to
access SQL databases. All the tutorials I have found so far require that
both SQL server and IIS reside on the same server. This is a problem for me
because I need to access multiple SQL servers from the same site so a stand
alone web server would be ideal.
From what I have been able to gather so far:
- "Anonymous Access" is unchecked and "Windows Integrated
Authentication" is checked in IIS
- The machine running IIS must be set as "trusted for delegation" in
active directory.
- The domain user accounts that will be accessing the databases an
site must not be marled "Account is sensitive and cannot be delegated".
- The tags <Identity impersonate="true"> and <Authentication
mode="windows"> is set in web.config
- comImpersonationLevel="Delegate" and
comAuthenticationLevel="PktPrivacy" are set in machine.config
After all that is set then the connection string "server=SQLserver;
Integrated Security=SSPI; Trusted_Connection=YES; database=SQLdatabase"
should be able to connect to the SQL database using the clients credentials.
However, I receive the following error:
--------------------------------------------------------------------
Exception Details: System.Data.SqlClient.SqlException: Login failed for user
'NT AUTHORITY\ANONYMOUS LOGON'.
Stack Trace:
[SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) +370
System.Data.SqlClient.SqlConnection.Open() +383
Rules.WebForm1.Page_Load(Object sender, EventArgs e) in
d:\inetpub\wwwroot\rules\rules.aspx.cs:47
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
----------------------------------------------------------------------------
I am trying to create a site using integrated windows authentication to
access SQL databases. All the tutorials I have found so far require that
both SQL server and IIS reside on the same server. This is a problem for me
because I need to access multiple SQL servers from the same site so a stand
alone web server would be ideal.
From what I have been able to gather so far:
- "Anonymous Access" is unchecked and "Windows Integrated
Authentication" is checked in IIS
- The machine running IIS must be set as "trusted for delegation" in
active directory.
- The domain user accounts that will be accessing the databases an
site must not be marled "Account is sensitive and cannot be delegated".
- The tags <Identity impersonate="true"> and <Authentication
mode="windows"> is set in web.config
- comImpersonationLevel="Delegate" and
comAuthenticationLevel="PktPrivacy" are set in machine.config
After all that is set then the connection string "server=SQLserver;
Integrated Security=SSPI; Trusted_Connection=YES; database=SQLdatabase"
should be able to connect to the SQL database using the clients credentials.
However, I receive the following error:
--------------------------------------------------------------------
Exception Details: System.Data.SqlClient.SqlException: Login failed for user
'NT AUTHORITY\ANONYMOUS LOGON'.
Stack Trace:
[SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction) +472
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString options, Boolean& isInTransaction) +370
System.Data.SqlClient.SqlConnection.Open() +383
Rules.WebForm1.Page_Load(Object sender, EventArgs e) in
d:\inetpub\wwwroot\rules\rules.aspx.cs:47
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Page.ProcessRequestMain() +750
----------------------------------------------------------------------------