none
getting login failed for user 'nt authority\anonymous logon' after deploying asmx web service through IIS.

    Question

  • Hi,

    I just deployed my asmx web service through IIS and got the url as http://localhost/ServiceLayer/service.asmx

    it gives me this error login failed for user 'nt authority\anonymous logon'.

    However, when running through VS 2010, it works just fine and connects to the database. Any help on this? I am using windows 7 with windows authentication and impersonation to true. 

    Saturday, July 13, 2013 12:54 PM

Answers

  • Hello Allen,

    Thanks for replying. When I run this web-service under a particular domain account like using my windows authentication and adding this account to the physical path credentials of my virtual directory, it works. But I wonder what if I need this to work using pass-through authentication. It gives the error message when I do that.

    Monday, July 15, 2013 3:08 AM

All replies

  • Hi Pulkit,

    Based on the error message, this issue can occur due to IIS service account, please make sure IIS service is running under a domain account. You can also refer to the steps on the following link:

    Failed NT Authority\Anonymous Logon for specific users
    http://forums.asp.net/t/1692935.aspx/1


    Allen Li
    TechNet Community Support

    Monday, July 15, 2013 1:17 AM
    Moderator
  • Hello,

    You don't have to set the IIS service account, you can set it as granular as the application pool owner account - that should be suffice.

    -Sean


    Sean Gallardy | Blog | Twitter

    Monday, July 15, 2013 2:46 AM
  • Hello Allen,

    Thanks for replying. When I run this web-service under a particular domain account like using my windows authentication and adding this account to the physical path credentials of my virtual directory, it works. But I wonder what if I need this to work using pass-through authentication. It gives the error message when I do that.

    Monday, July 15, 2013 3:08 AM
  • Hi, to connect to SQL Server using Windows integrated authentication, you must identify the Windows identity under which your ASP.NET application is running. You must also be sure that the identity has been granted access to the SQL Server database.

    How to: Access SQL Server Using Windows Integrated Security
    http://msdn.microsoft.com/en-us/library/bsz5788z(v=vs.100).aspx


    Allen Li
    TechNet Community Support

    Monday, July 22, 2013 1:15 AM
    Moderator