2012年9月3日 星期一

Login failed for user 'IIS APPPOOL\ASP.NET v4.0'


Web site connection fail on trying to open a connection to SQL Server.
Add a login to SQL Server for IIS APPPOOL\ASP.NET v4.0 and grant permissions to the database.
In SSMS, under the server, expand Security, then right click Logins and select "New Login...".
In the New Login dialog, enter the app pool as the login name and click "OK".
enter image description here
You can then right click the login for the app pool, select Properties and select "User Mapping". Check the appropriate database, and the appropriate roles. I think you could just select db_datareader anddb_datawriter, but I think you would still need to grant permissions to execute stored procedures if you do that through EF.

沒有留言:

張貼留言