none
Login failed for user 'sa'. Reason: Password did not match that for the login provided. [CLIENT: xxx.xx.xx.xx]

    Question

  • After trying to figure out why I was unable to connect to my remote SQL Server 2008 engine and changing some IP/TCP settings, I now seem to be getting this error when trying to connect my application locally to SQL Server.

     

    Any ideas what this means ? I can connect via SQL Management tools no problem using Windows Authentication. My connectionstring is as follows:

        <add connectionString="Data Source=.\SQL2008;Trusted_Connection=true;Initial Catalog=MyDatabase;" name="ASXLoggingConnectionString"/>

     


    MS Vendor - MS All the way! Follower since 1995 MS Super Evangelist| MSDN Forums Moderator
    Monday, April 05, 2010 12:22 PM

Answers

  • its set for mixed mode. But I figured out the problem eventually after I enabled remote debugging on the ASP.NET application, it was to do with the fact that NETWORK SERVICE account wasnt added into the database im trying to connect to.
    MS Vendor - MS All the way! Follower since 1995 MS Super Evangelist| MSDN Forums Moderator
    • Marked as answer by ahmedilyas Monday, April 05, 2010 7:13 PM
    Monday, April 05, 2010 4:23 PM

All replies

  • What authentication mode is your remote SQL Server is setup to?

    Based on your posted connection string you are using windows authentication  i.e. Trusted_Connection=true and

    Error message is thrown when SQL Server is using SQL Authentication...

    I would also suggest your run SQL Profiler to capture audit login failed event. 

    Monday, April 05, 2010 3:21 PM
  • its set for mixed mode. But I figured out the problem eventually after I enabled remote debugging on the ASP.NET application, it was to do with the fact that NETWORK SERVICE account wasnt added into the database im trying to connect to.
    MS Vendor - MS All the way! Follower since 1995 MS Super Evangelist| MSDN Forums Moderator
    • Marked as answer by ahmedilyas Monday, April 05, 2010 7:13 PM
    Monday, April 05, 2010 4:23 PM
  • ahmedilyas,

     

    Adding NETWORK Service Account resolved the issue , but this doesnt seems to a solution to the problem.

    Try this

    U need to run you ASP.Net application pool with a Service Account (domain account).Add the same account into SQL Server Security.

    Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;


    Mohd Sufian www.sqlship.wordpress.com Please mark the post as Answered if it helped.
    Monday, April 05, 2010 5:28 PM
  • actually, it should be running under the NETWORK SERVICE account, not a service account. AFAIK, all ASP.NET processes run under the default network service account as it is a network service, not a system service
    MS Vendor - MS All the way! Follower since 1995 MS Super Evangelist| MSDN Forums Moderator
    Monday, April 05, 2010 7:12 PM