Configure IIS to impersonate a user for SQL Integrated Authentication
I have a question about how to configure my web site and IIS using Active Directory.
I have a web app which will be running exclusively on our company's internal network. The SQL Database that the app needs to connect to (via active directory) can only be accessed by one specific AD user DBAccess but I am using Windows Authentication mode to validate my users. I would put the identity impersonate ri开发者_Python百科ght into my Web.Config but the DB user does not have rights on the web server computer.
How would I configure IIS to use the DB Access user for connecting to the SQL Server and not for running locally on the web server?
Thanks in advance and sorry if this is a bit basic.
- Set the application pool your application is using to run as the user you wish to connect to the DB as.
- Add
Integrated Security=true;
to your connection string.
精彩评论