Home | Feedback | Login

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

Run the following on SQL Server:

CREATE LOGIN [IIS APPPOOL\DefaultAppPool] FROM WINDOWS
GO
CREATE USER [IIS APPPOOL\DefaultAppPool] FOR LOGIN [IIS APPPOOL\DefaultAppPool]
GO
EXEC sp_addrolemember 'db_datareader', 'IIS APPPOOL\DefaultAppPool'
GO
EXEC sp_addrolemember 'db_datawriter', 'IIS APPPOOL\DefaultAppPool'
GO