Windows Authentication on SQL with AD username and password in the connection string

Hi, I am writing an ASP.Net MVC intranet application accessed through handheld computers and a number of browsers. My users have AD accounts and have different permissions on our views / procs of the SQL database, depending on who they are. The database also uses CURRENT_USER for horizontal splitting.

Due to the range of devices that require access to the application, I cannot rely on impersonation / delegation or a trusted subsystem. I want the user to simply enter a username and password (same as AD) when the above mechanisms fail.

Does anyone know how I can use the AD username and password in the connection string to access the database without creating a set of SQL mirror accounts? I cannot log in using the network service or sql proxy account because the database must be aware of the user.

+3
source share
1 answer

You cannot do this in the connection string.

It’s best to make ASP.NET code the person you want to connect to. This can be a bit more complicated with ASP.NET, as the impersonation layer is already on, but it is doable.

. MSKB " " , .

+5

Source: https://habr.com/ru/post/1757061/


All Articles