简体   繁体   中英

IIS/ASP.NET connecting to SQL Server using unknown user

Defined a SQL Server, which only user x (in the domain) is allowed to connect to and only by using windows authentication.
I am connecting to the computer using user x successfully.
I am running my website from visual studio successfully.
But when I am trying to access my website on IIS it fails because it is using a different user than x:
When my ASP.NET web site is trying to connect it fails because it is using user y.
The connection string does not specify a user and password it uses windows authentication.
where did user y came from? is it the user that IIS was installed with or log on with?

The SQL Server is not mine so I cannot add users or change the authentication method there.

Is there a way that IIS/ASP.NET to impersonate (is that the term) user x?

看看这些链接是否有帮助: IIS模拟 IIS 7配置

Do you have Integrated Security=True in your connection string?

If so it's going to try to use the anonymous/IIS_USER account to access the DB instead of what you have in your connection string.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM