Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting the ASP.NET ConnectionString to a specific domain user

We have a windows account in the SQL Server 2008 called drwho for example and a password. In the connection string we disabled integrated security and added User Id and password values.

User Id=THEDOMAIN\drwho;Password=......

However ASP.NET keeps thinking we are using SQL server authentication.

Any suggestions?

like image 987
Google Avatar asked Dec 05 '25 10:12

Google


2 Answers

You cannot connect to SQL server using a domain user/pass. If you wish to connect as a domain user, you need to specify integrated security and run your ASP.NET process as that user. See this page at Microsoft for more information.

like image 162
edosoft Avatar answered Dec 07 '25 11:12

edosoft


You will have to use impersonate to do this. As far as I'm aware you can't pass domain usernames/passwords in connection strings only a trusted connection, .e.g.

<identity impersonate="true"
          userName="domain\user" 
          password="password" />
like image 29
Chris S Avatar answered Dec 07 '25 09:12

Chris S



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!