error raised: Login Failed for user 'NT Authority\Anonymous LOGON'

Joined
Oct 18, 2007
Messages
1
Reaction score
0
Hello!
Please help me to solve one annoyed problem:

I got the error message “Login Failed for user 'NT Authority\Anonymous LOGON'” in my asp.net application when my Web Server and DB Server are on different machines.

What is inside my web.config:
<authentication mode="Windows"></authentication>
<authorization>
<deny users="?" />
</authorization>
<identity impersonate="true"></identity>

What is inside my aspx server code:
SqlConnection connection = new SqlConnection(@"Data Source=HP\SQLEXPRESS;Initial Catalog=CMDB;Integrated Security=SSPI;");
connection.Open();


I also unchecked ‘Anonymous access’ checkbox on the web application’s Security tab (IIS version 5.1).

Note that if I run the same above-mentioned code in test Windows app from the Web Server machine, it works fine!
Note also that code WindowsIdentity.GetCurrent.Name() placed in asp.net page correctly returns my user domain account.

So I can‘t desperately realize how can I fix the problem and why Web Server tries to connect to DB machine under 'NT Authority\Anonymous LOGON' though impersonation as you can see is on and my web application works under my domain account.

Thanks in advance for any help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top