I have a web application that queries data from a SQL Server. For develoment, I used integrated security to connect to the database. Now, I would like to put the application on a server and connect to the SQL Server using a username/password.
Here is my connection string
"data source=CHRISANNE;initial catalog=TAPTest;uid=TapWEBUser;pwd=myPassword"
When I attempt to connect to the SQL Server, I get the following error:
Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'TapWEBUser'
The user profile was created and was added to the database with public, db_datareader, and db_datawriter permissions. I'm not sure what I am doing wrong. Does anyone have any suggestions? Thanks in advance!
TimCan you login to the database using that user name and password using Query Analyzer? I would try "User ID" rather than "uid". I do not see uid in the documentation.|||I attempted to login to the database using the Query Analyzer...no luck.
I recieved the following error.
Msg 18456, Level 16, State 1
Login failed for user 'TapWEBUser'
Also, I changed the uid to User ID....also no luck. Any more suggestions? Thanks.|||Well, then TapWEBUser is not set up correctly, or you are using the wrong password, or some combination. Until you can log into Query Analyzer, you have a SQL user problem unrelated to ASP.NET.
I would try and reset the users password and give it another shot.|||Ok...thanks for the advise. I found the problem. The dba gave me the wrong password.
Thanks for your help.
No comments:
Post a Comment