locked
How To Determine Details of Connection Refusals RRS feed

  • Question

  • I am trying to use the AspNetSqlMembershipProvider. I used the ASP.NET configuration wizard in VS2010 to create aspnetdb and a user. I can return to the wizard, and have access to everything. However, I am unable to login from my app; the SQL Server is actively refusing the connection. The proxy user is a dbo of the database. Looking at the SQL logs, I can see successful log ins by my user when I attempt to log in, but no entries for the refusal (e.g. who is being refused). Where should I be looking?

    TIA, Marc

    Saturday, July 9, 2011 1:37 PM

Answers

  • I resolved this issue. The error message is misleading; the SQL Server is not "actively refusing the connection". The SQL Server was not being located. The web server is new and the website was recently moved to it. However, the SQL Server being used by the website was not visible to the web server, e.g. I could not ping the SQL Server from the web server. This was in part because the SQL Server was in a different domain than the web server. My workstation and the previous web server had custom "host" files that specified the DNS information needed to resolve the location of the SQL Server. That is why it had been working and worked from my development machine. The solution was to modify the "host" file of the new web server to match.

    Thanks Leks and Erland for stepping up though.

    Marc


    • Marked as answer by AlaskanRogue Saturday, July 23, 2011 2:27 PM
    Saturday, July 23, 2011 2:26 PM

All replies

  • By default SQL server is configured to track login failure in SQL error log (sp_readerrorlog)  , but it can be changed as mentioned in the BOL link here http://msdn.microsoft.com/en-us/library/ms175850.aspx . Has this option been correctly configured to capture the login failures ?

    Once you have the login failures coming in your error log , then you may use my article to troubleshoot the login failed error 18456 http://sql-articles.com/articles/troubleshooting/troubleshooting-login-failed-error-18456/ .

    Any other connectivity issues may not be logged here but ring buffer connectivity may have those error messages


    Thanks, Leks
    • Marked as answer by Alex Feng (SQL) Sunday, July 17, 2011 10:33 AM
    • Unmarked as answer by AlaskanRogue Saturday, July 23, 2011 2:26 PM
    Sunday, July 10, 2011 7:34 AM
  • Could you post the exact error message?


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Sunday, July 10, 2011 8:37 AM
  • I resolved this issue. The error message is misleading; the SQL Server is not "actively refusing the connection". The SQL Server was not being located. The web server is new and the website was recently moved to it. However, the SQL Server being used by the website was not visible to the web server, e.g. I could not ping the SQL Server from the web server. This was in part because the SQL Server was in a different domain than the web server. My workstation and the previous web server had custom "host" files that specified the DNS information needed to resolve the location of the SQL Server. That is why it had been working and worked from my development machine. The solution was to modify the "host" file of the new web server to match.

    Thanks Leks and Erland for stepping up though.

    Marc


    • Marked as answer by AlaskanRogue Saturday, July 23, 2011 2:27 PM
    Saturday, July 23, 2011 2:26 PM