I have an Asp.Net MVC 2 Web Application and an SQL Express service.
Is it possible to use a defined Windows user instead of the built-in IUSR to connect to the database.
If yes, please indicate the required settings
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to run all your DB requests as a specific user then modify your app pool to run as the desired user. See Specify an Identity for an Application Pool. This is the correct way, you will find plenty of bad advice on this topic, like using LogonUser. Don’t do that.
If you want to connect to the DB as whichever the user that connected to your intranet site, then you need to use impersonation ( see ASP.NET Impersonation) and enable constrained delegation (see Configuring Constrained Delegation for IIS).