Sql – Trusted Connection when SQL server and web Server are on two separate machines

connectionsql

http://weblogs.asp.net/achang/archive/2004/04/15/113866.aspx

Before asking a question I tried to follow through the points in the above article to set up a trusted connection between a MS SQL server and a production IIS 7 server.

I essentially want the DB connection string to connect to the server without having to pass login info.

They are not a private network.

I have tried the points in the article but this didn't work.

Does anyone have any other suggestions on how I can achieve this?

Best Answer

The method works if either the IIS Application Pool and SQL Server login are the same domain account, or if they share username and password (i.e. fall back to workgroup like mode of login).

The way I get the IIS web application to run under a specified user account is to create an application pool with the identify I want, and then assign the web application to use that application pool. No need for impersonation settings in Web.Config.