Sql – WCF Impersonation and SQL trusted connections


We have a service that is hosted under IIS7. The connection string for the SQL server is set to Trusted. In order for the authentication to happen I need to setup impersonation on the service and have the client initiate an impersonated connection.

Is there a way to not have impersonation set and still allow the service to log into the SQL server, via the trusted connection? We want to avoid having the clients log into the service. We are not sure what they will be using as a proxy. I would think it is more of a service level agreement with the SQL server rather than the client to the service to the SQL server.

Any thoughts?


Best Solution

If you use a domain account to run the Application Pool that the service is running under, you can grant that account access to the SQL server. In this case, only the account that is running the app pool will need to have rights.