T
TipTop
I am trying to use integrated Windows authentication and
impersonation to run a page that accesses SQL Server via integrated
security. It's not working -- sort of. I've set IIS security to
integrated Windows authentication (and unchecked the other options).
I've set the web.config to use Windows authentication and set
impersonation to true. The connection string includes Integrated
Security = SSPI. And it works... if you access the page from the same
machine. If you call the page over the network (even when logged in
under the same Windows account as when on the server), it fails with
the "Login failed for user '(null)'" error. I display the results of
Environment.UserName on the page (commenting out the sql connection
code so that it will run when calling it over the network), and in all
cases it shows the correct username. (I call the page over the network
and sure enough it displays my account name.)
impersonation to run a page that accesses SQL Server via integrated
security. It's not working -- sort of. I've set IIS security to
integrated Windows authentication (and unchecked the other options).
I've set the web.config to use Windows authentication and set
impersonation to true. The connection string includes Integrated
Security = SSPI. And it works... if you access the page from the same
machine. If you call the page over the network (even when logged in
under the same Windows account as when on the server), it fails with
the "Login failed for user '(null)'" error. I display the results of
Environment.UserName on the page (commenting out the sql connection
code so that it will run when calling it over the network), and in all
cases it shows the correct username. (I call the page over the network
and sure enough it displays my account name.)