locked
Failed to login SQL Server. Need help. RRS feed

  • Question

  • Environment: Windows Server 2008 x64
                        SQL server 2008 installed on a remote server
                        IIS 7.0
    It worked well when I use Visual Studio Development Server in visual studio. But after I changed to Use Local IIS Web Server, It does not work at all. The error message:
             Login failed for user 'xxxx'. Reason: Token-based server access validation failed with an infrastructure error. Check for previous error.
             Error:18456, Severity:14, State:11
    I used windows authentication to login SQL Server. The server has been configured for windows authentication only. The 'xxxx' in the error message is not the user name, but the computer name.

    Can anyone help me?
    Monday, January 4, 2010 11:46 AM

Answers

  • Hi ! 

    There are many MSDN Posts with similar issue . Request you please perform search criteria before ! 

    The error 18456 is generic login failure message .“The key to the message is the 'State' which the server will accurately set to reflect the source of the problem.” ,please refer the error logs to find the detailed error message information  .Please refer the following article published by lekss .

    http://sql-articles.com/articles/troubleshooting/troubleshooting-login-failed-error-18456  

    Refer the following links please 

    "http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx" "MSDN article"
    http://sql-articles.com/articles/troubleshooting/troubleshooting-login-failed-error-18456  

    STATE 11 &12:

    This state means the domain login trying to access sql server that wasn’t explicitly added to sql server .Even though it can access OS, it can’t login in to sql server. To overcome this error, you can add that domain login to sql logins explicitly provided you have create login permission

    -------------
    Thanks,Suhas V

    • Marked as answer by Tong Da Tuesday, January 5, 2010 3:58 AM
    Monday, January 4, 2010 7:59 PM
  • Thanks for your reply.

    I searched a lot for the solution, and I have read the article http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx before I ask this question. But it did not help.
    Now the problem has been solved.
    The reason of the problem is that:
    1. as http://sql-articles.com/articles/troubleshooting/troubleshooting-login-failed-error-18456 wrote, the domain that IIS running on need to be add into logins of sql server;
    2. if I want to use 'sa' to logon sql server, I need to modify the connection string in settings.Designer.cs, not the app.config.
    • Marked as answer by Tong Da Tuesday, January 5, 2010 3:58 AM
    Tuesday, January 5, 2010 3:57 AM

All replies

  • Hi ! 

    There are many MSDN Posts with similar issue . Request you please perform search criteria before ! 

    The error 18456 is generic login failure message .“The key to the message is the 'State' which the server will accurately set to reflect the source of the problem.” ,please refer the error logs to find the detailed error message information  .Please refer the following article published by lekss .

    http://sql-articles.com/articles/troubleshooting/troubleshooting-login-failed-error-18456  

    Refer the following links please 

    "http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx" "MSDN article"
    http://sql-articles.com/articles/troubleshooting/troubleshooting-login-failed-error-18456  

    STATE 11 &12:

    This state means the domain login trying to access sql server that wasn’t explicitly added to sql server .Even though it can access OS, it can’t login in to sql server. To overcome this error, you can add that domain login to sql logins explicitly provided you have create login permission

    -------------
    Thanks,Suhas V

    • Marked as answer by Tong Da Tuesday, January 5, 2010 3:58 AM
    Monday, January 4, 2010 7:59 PM
  • Try to turn off UAC in SQL Server machine and then try to connect from IIS
    Vidhya Sagar. Mark as Answer if it helps!
    Tuesday, January 5, 2010 2:38 AM
  • The UAC in Windows Server 2008 is off by default.
    Tuesday, January 5, 2010 3:53 AM
  • Thanks for your reply.

    I searched a lot for the solution, and I have read the article http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx before I ask this question. But it did not help.
    Now the problem has been solved.
    The reason of the problem is that:
    1. as http://sql-articles.com/articles/troubleshooting/troubleshooting-login-failed-error-18456 wrote, the domain that IIS running on need to be add into logins of sql server;
    2. if I want to use 'sa' to logon sql server, I need to modify the connection string in settings.Designer.cs, not the app.config.
    • Marked as answer by Tong Da Tuesday, January 5, 2010 3:58 AM
    Tuesday, January 5, 2010 3:57 AM