kroiz
kroiz

Reputation: 1772

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?

Upvotes: 0

Views: 2009

Answers (1)

user1231231412
user1231231412

Reputation: 1659

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.

Upvotes: 1

Related Questions