Login failed for user 'IIS APPPOOL\DefaultAppPool' Options

codeling 1262 - 5391
@2020-01-19 18:35:45

When I migrate my ASP.NET web application to a new Windows server,  I got the error "Login failed for user 'IIS APPPOOL\DefaultAppPool". The database is MS SQLSERVER 2016.

 

 

codeling 1262 - 5391
@2020-01-19 18:38:39

The application failed to open a connection to SQL Server.

You need to add a login to SQL Server for IIS APPPOOL\DefaultAppPool and grant permissions to the database.

In SQL Server Management Studio (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".

You can then right click the login for IIS APPPOOL\DefaultAppPool, select Properties and select "User Mapping". Check the appropriate database, and the appropriate roles:

Users browsing this topic
Guest