none
Login Page - after user credential supplied - Error Message - Login failed for user 'DomainName\ServerName$'. RRS feed

  • Question

  • Dear All,

    Problem:After submission of user credential in the login page, Shows the error message- Login failed for user 'DomainName\ServerName$'.

    Assumption:Problem in connecting from web page to sqlserver.

    Environment:

    Windows server 2008 R2,Sqlserver 2005,IIS 7.0.[Database and application is in the same server]

    server and user has full admin rights in the server.

    Attempts to solve the problem:

    1.Changed the connection string in web.config from IntegratedSecurity = true to User ID=sa;Pwd=sa"

    2.Changed the various Identity in the Process Model, the property of the Application Pool[Application Pool - Advanced Settings - Process Model - Identity ]

     Query:

    1.Is the problen related to the Connection string?

    2.The same setup worked very fine in Windows 2003, Now we are upgrading to Windows 2008 R2[IIS 7.0].

    3.Do we need to change anything in Sqlserver-particular Database-security-users-NT Authority.

    4.If other things, can you help to sort it out?

    Sunday, January 8, 2012 12:57 PM

Answers

  • ServerName$ -- The thing to note here is the "$"! This means that either the local system or the network service account is being used to make the connection.

    If you want to use local system a/c - Be sure it exists under sql logins.

     


    Thanks - Vijay Sirohi
    Sunday, January 8, 2012 7:51 PM
    Answerer

All replies

  • Dear All,

    Problem:After submission of user credential in the login page, Shows the error message- Login failed for user 'DomainName\ServerName$'.

    Assumption:Problem in connecting from web page to sqlserver.

    Environment:

    Windows server 2008 R2,Sqlserver 2005,IIS 7.0.[Database and application is in the same server]

    server and user has full admin rights in the server.

    Attempts to solve the problem:

    1.Changed the connection string in web.config from IntegratedSecurity = true to User ID=sa;Pwd=sa"

    2.Changed the various Identity in the Process Model, the property of the Application Pool[Application Pool - Advanced Settings - Process Model - Identity ]

     Query:

    1.Is the problen related to the Connection string?

    2.The same setup worked very fine in Windows 2003, Now we are upgrading to Windows 2008 R2[IIS 7.0].

    3.Do we need to change anything in Sqlserver-particular Database-security-users-NT Authority.

    4.If other things, can you help to sort it out?

    Sunday, January 8, 2012 12:52 PM
  • Can you show us the entire message , take a look at State parameter in error message?
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Sunday, January 8, 2012 1:06 PM
  • What are the authentication modes your SQL Server is configured ? Mixed mode or Sql authentication ?

    Are you able to connect to your SQL Server using SSMS with the same credentials?

    also when you are providing "SA" as user name in your  connection string, it means its the SQL Server authentication, then " 'DomainName\ServerName$"  shall not be shown


    Thanks
    Manish

    Please use Mark as Answer if my post solved your problem and use Vote As Helpful if a post was useful.
    Sunday, January 8, 2012 1:53 PM
  • Apparently IIS runs under Local Service or Network Service or some such. It might work if you grant access to DomainName\ServerName$ on SQL Server. You can cop out with using an SQL Server login (although not "sa"!), but then you need to make sure that the SQL Server machine cannot be reached directly, since then anyone could login with that user.

    You can also change IIS to run under a domain account, but I have zero idea whether that is a good idea with regards to IIS. (I know nothing about IIS.)


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    Sunday, January 8, 2012 1:57 PM
  • ServerName$ -- The thing to note here is the "$"! This means that either the local system or the network service account is being used to make the connection.

    If you want to use local system a/c - Be sure it exists under sql logins.

     


    Thanks - Vijay Sirohi
    Sunday, January 8, 2012 7:51 PM
    Answerer