Problem authenticating to sql server from asp.net

W

wendygt

I have a development webserver currently running 6 asp.net web
applications, a webservice, and a scheduled service that are under
Integrated Windows Authentication and that carry the credentials all
the way to the sql server database that is on another server. I have
had no problem with this scenario in any of my applications. Recently,
I took over an application written by someone else. It is very simple,
but it uses Enterprise Library to perform all data actions. The c# web
app has impersonates = true in the web.config and the site has
integrated authentication only turned on - just like all my apps that
are working. However, everytime there is a call to the database, I get
"Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'."

I set up a test page (stolen from microsoft) to see what user
information was coming into the site and received the information as
follows:

HttpContext.Current.User.Identity
Name [windows auth name]
IsAuthenticated: True
AuthenticationType: Negotiate


WindowsIdentity.GetCurrent()
Name [windows auth name]
IsAuthenticated: True
AuthenticationType: NTLM


Thread.CurrentPrincipal.Identity
Name [windows auth name]
IsAuthenticated: True
AuthenticationType: Negotiate

If I go onto the server and hit the site by typing in
localhost\sitename, I can perform all operations, and then if I go to
my personal computer on the intranet, I can THEN perform all
operations, but no one else can. Once I reset iis, I cannot do
anything again until I hit the site locally. I am an admin on the dev
machine.

One more thing - if I type in the userName and password pair on the
impersonates element, everything performs correctly, but as me, of
course. Please 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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top