Set up a new MSSQL Server database user for asp.net

critto
critto used Ask the Experts™
on
Hi experts,

I am developing an asp.net mvc application and I am trying to use a different account with sql server than my system account. I have set up a user in sql server, and added that user to the list of users for the database i am trying to connect to.

When my site hits the database locally, it won't connect with the sqlserver login credentials. Instead Im getting the NT Network \ SQL server Authroisation error.

Im locally working in 3.5 framework with IIS7 and sql 2008.

Should I not just be able to add a user to the database and then make requests to the sql server from my site using the new user's id and password?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Are you using "localhost" if you connect locally?

If yes, try to use the computername or ip instead (not loopback ip 127.0.0.1)

Author

Commented:
This worked. Cheers. I also thinned out the connectionstring to only have data source, database, user id and password

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial