I have some issues trying to create a web application under windows security.

Connection string

<connectionStrings>
<add name="MindMonitorODSEntities" connectionString="metadata=res://*/Models.EntityModel.MyEntityModel.csdl|
res://*/Models.EntityModel.MyEntityModel.ssdl|
res://*/Models.EntityModel.MyEntityModel.msl;provider=System.Data.SqlClient;
provider connection string=&quot;
data source=serverIP;
initial catalog=testDatabase;
integrated security=True;
MultipleActiveResultSets=True;
App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>

Web.config

<authentication mode="Windows" />

IIS Configuration

-ApplicationsPool properties:

Identity --> ApplicationPoolIdentity
Load UserProfile --> True

-Application's options:

Windwows-Authentication: Activate
[All others are deactivated]
Providers for Windows-Authentication: NTLM / Negotiate

When I run the application the following error is raised:

Serverfehler in der Anwendung /.

Cannot open database "testDatabase" requested by the login. The login failed.
Login failed for user 'DOMAIN\MACHINENAME$'.

Some used possible solutions send me a different error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

After checking several solutions in SO... I don't get it to work. The closest I get is by using in the web.config the impersonation = true or by using the "Connect as..." in IIS with a login user, but then the database is always called with that user and I want+need to execute some stored procedures AS CALLER to resolve the identity inside

Already checked:

Web App getting Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON' Possible Connection String Issue?

Login failed for user 'DOMAIN\MACHINENAME$'

Login Failed for user Domain\MachineName$ on IIS 7.5 with an ApplicationPoolIdentity

Related posts

Recent Viewed