Question

I have uploaded my website on IIS 7 Windows Server 2008. Everything works fine. My site also uses database SQL to keep record of users. But when I try to login I get following error.

 Cannot open database "MyCoolDb" requested by the login. The login failed.
 Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.

 Ausnahmedetails: System.Data.SqlClient.SqlException: Cannot open database   
 "MyCoolDb"     
 requested by the login. The login failed.
 Login failed for user 'IIS APPPOOL\ASP.NET v4.0'.
Was it helpful?

Solution

You can add this user to your DB Logins by openning SQL Management Studio, Navigate to your database then open the Security then Logings and add new login and search for that user

OTHER TIPS

with refrence to this Link: Login failed for user 'IIS APPPOOL\ASP.NET v4.0'

you need to add IIS APPPOOL\ASP.NET v4.0 as it is in the Login on SQL Server Management Studio

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top