1

Inherited some legacy code that makes use of SQL authentication which I want to eliminate.

When I tried using Windows auth, the connection seemed to be getting created using ANONYMOUS LOGIN. is there a way to connect using a Windows account instead?

1 Answer 1

0

Can you try following connection string:

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
User ID=myDomain\myUsername;Password=myPassword;

Source:

ConnectionStrings.com

2
  • That may work, but another aim is to not store the password in plain text anywhere. I'll give this a try on Monday as well..
    – Akash
    Jul 19, 2014 at 5:15
  • Than you can store the password somewhere encrypted and decrypt it in code, than append to connection string.. Jul 19, 2014 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.