سؤال

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'.
هل كانت مفيدة؟

المحلول

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

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top