Login failed for user ‘IIS APPPOOL\Classic .NET AppPool’

asp.netiis

I just added my website to IIS. After much troubleshooting I was able to make it run with the Classic .NET App Pool.

But on the page which requires connecting with the database, I am getting the error "Login failed for the user 'IIS APPPOOL\Class .NET AppPool'

Please suggest a workaround.

Best Answer

Are you using integrated security in the DB connection string? if so, you either need to change the connection string to specify a username or password. or change the asp.net settings in IIS to enable impersonation, this will mean the web app is running as another specified user (you would need to ensure the alternate user has access to the database otherwise you will have the same problem!)