Last post Sep 20, 2012 08:39 PM by Maikol
Sep 20, 2012 04:58 PM|Maikol|LINK
I have read Login failed 'NT AUTHORITY\ANONYMOUS LOGON' is tipical configuration error, but I can't get what I'm missing, any help will be apreciated.
I have three servers: Web Server (IIS 7.5), BD Server (SQL Server 2008) and AD Server. All of them with Windows Server 2008 R2.
I need to set Windows Authentication in order to allow user authenticated in the Web App, automatically has access to the BD.
I have set in the Web Config file the following:
<authentication mode="Windows" />
<identity impersonate="True" />
<add name="cs" providerName="System.Data.SqlClient" connectionString="Data Source=SERVER\SQLINSTANCE; Initial Catalog =BD_NAME; Integrated Security = SSPI; connection timeout=60;" />
In the BD Server I have created the Logins with the domain users of the Active Directory who has access to the application. Those user have the permissions mapping to the BD.
When I access the url I get the error Login failed 'NT AUTHORITY\ANONYMOUS LOGON'
Sep 20, 2012 08:09 PM|necro_mancer|LINK
to resolve your issue, you need to login to your SQL Server and you need to create a SQL user that is mapped to your database with the dbo_owner permission.
I have done this so many times and I guarantee it will work. Good luck!
Sep 20, 2012 08:39 PM|Maikol|LINK
You are right, that's one way how it works.
However, in this way I have to set this domain user and password in the Web Config and then mapped it on the BD.
<add name="csIntranet" providerName="System.Data.SqlClient" connectionString="Data Source=SERVER; Initial Catalog =DATABASE; uid=USER; password=PSW; connection timeout=60;" />
But I have to avoid this for a security requirement. I need to set Windows Authentication in IIS and then mapping on SQL Server the domain or group user who have access to the app; hoping that when I access to the web site, the IIS send the request to SQL
with the user authenticated and not with the anonymous.
How is it possible?