3

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?

4 Answers 4

5

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.

Sign up to request clarification or add additional context in comments.

Comments

4

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" />

1 Comment

But remember this modifies the whole process to run as this user, so you may bump into resource permissions when doing this. Also, have a look at CryptProtectData to help encrypt the password stored in the config file. See: msdn.microsoft.com/en-us/library/72wdk8cc.aspx
-1

the best place to check the validity of your connections strings is here

I suspect that you have not quite got the format correct.

Comments

-1

Have you had a look at http://www.connectionstrings.com/? Always a good resource if you're having connection problems.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.