Tom McDonald
asked on
System.Data.SqlClient.SqlException: Login failed for user 'domain\user'.
I am using trusted connections and I have configured IIS 7 to use connect as a specific active directory user. However, when it connects it doesn't use the user I set up for it (see attached image). It connects with the machine name! The error I get is:
System.Data.SqlClient.SqlE xception: Login failed for user 'AD\MYComputer$'.
In the error 'AD\MyComputer' is the name of my development laptop. Why isn't it connecting as the user I specified? How do I fix it?
System.Data.SqlClient.SqlE
In the error 'AD\MyComputer' is the name of my development laptop. Why isn't it connecting as the user I specified? How do I fix it?
The connect as that your image shows is only to connect to a directory, not to a database that is part of your application. The error indicates an issue trying to connect to SQL. Try modifying your application pool to run as this domain user by clicking on Application Pools, select the catsmerge app pool, and then click on advanced settings. From there you can modify the identity so that it runs under the domain account.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You're right, I didn't realize it, but I had the web.config identity impersonate set to true. I set it to false and then the correct identity was passed
Do you have (another) connectionstring in a web.config file or something?