ASP.NET: Error "Login failed for user 'sa'."

  • Thread starter Thread starter Tony
  • Start date Start date
T

Tony

Dear all,

When running the .ASPX program, I recieved the following error

"Exception Details: System.Data.SqlClient.SqlException: Login failed for
user 'sa'."

I reinstalled Sql Server and issue is fixed. However, the issue occur again
after a while.

In web.config file, the connection setting is below:
"
<appSettings>
<add key="PubsString" value="workstation
id='sha-tongl-xp1';uid=sa;pwd='';server=localhost;initial
catalog='Pubs'"></add>
</appSettings>
"
Any help will be highly appreciated.

-Tony
 
Dear Tony,

I see some problem with your connection string only.

can you check the connection string whether its right?

hope it helps.
 
Tony,
Are you the only one with access to SQL Server? You are using the worst
combination of security if you expose the SQL Server to the web. If you did
not change the password (which is the problem I think) then someone else
has. That is why you are getting the login failed since the sa user now has
a password.

Lloyd Sheen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top