We are using MVC4 for creating a web application and IIS for hosting the App.We used service account as user in app pool for connecting to database previously .Now we want users to use their windows credentials for connecting to Database we used authentication mode as "windows" and impersonate as "true"
in IIS Authentication we Enabled Windows Authentication and ASP.net Impersonation .
But when I try to connect to database from application I'm getting following error
" Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'".
Exception as "System.Data.SqlClient.SqlException"
Can some one guide me to Achieve the above request.
0
votes
1 Answers
0
votes
This is a Kerberos Double-Hop scenario and requires Kerberos Constrained Delegation to be enabled and requires IIS and SQL Server to have proper Server Principal Names (SPN) for their service acocunts.
See eg here and Microsoft® Kerberos Configuration Manager for SQL Server®