Login failed for user 'NT AUTHORITY\ANONYMOUS LONGON Exception

  • Hi,

    I have a windows service that calls a SP in an SQL database to do a simple insert statement to a table. when i start my service, i get an exception that says

    "Login failed for user 'NT AUTHORITY\ANONYMOUS LONGON".

    In debugging my code, this is happening when I want to open the connection to the DB. What causes this, and how can i fix this?

    Thanks for your response.

  • Windows can only pass authentication keys from one computer to one other, it doesn't allow chaining them. So, if you use Windows credentials to log in to a workstation, that connects to a server, which calls a connection to another server, the second server can't receive your credentials, and thus it's an anonymous login attempt.

    The answer is either to remote to the server and log in directly there, or to use kerberos, or (if applicable in linked servers and such) user SQL logins instead of Windows logins.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply