Erdem ┼×ekerci Erdem ┼×ekerci - 1 year ago 184
ASP.NET (C#) Question

Login failed for user 'IIS APPPOOL\myAppPoolName' and cannot add new user for this

I am getting the following error while app trying to connect database.

Login failed for user 'IIS APPPOOL\myAppPoolName'.

I use ms SqlServer 2008 r2, windows server 2008 r2.

This happened when I've just moved the application and database from one server to another.

I thought adding a new user to database named 'IIS APPPOOL\myAppPoolName' but when i try it, I'm getting following error on adding new db user wizard:

'IIS APPPOOL\myAppPoolName' is not a valid name because it contains invalid characters. (Microsoft SQL Server, Error: 15006)

How can I fix this?

Thanks in advance.


Answer Source

By default, custom application pools receive the 'Network Service' user credentials. Simply try adding a new login for your mssql server (and database, of course) for the 'Network Service' account. Read more here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download