Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > .NET, Integrated Windows Authentication, and more

Thread Tools

.NET, Integrated Windows Authentication, and more

Posts: n/a
First of all, with identity impersonate = true, I still get this blasted error: Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

It seems like it simply will not send the domain username and password that I'm authenticated as! It is endlessly frustrating. I have the machine.config entries as follows:

<identity impersonate="true" userName="" password=""/>

and for the process part...


My web.config is as follows:

<configuration><system.web><compilation debug="true"/><customErrors mode="Off"/><authentication mode="Windows" /><identity impersonate="true"/></system.web></configuration>

All I want to do is authenticate to the SQL server (which is not the same machine as the IIS box) using the domain username and password I'm signed on as. That way I can assign permissions and rights on the database side. This cannot be that hard. What am I missing?

Thanks in advance.
Reply With Quote
Holly Mazerolle
Posts: n/a
When you have impersonation set to true with no user name and password
specified you will be impersonating the authenticated IIS user. This means
that if you are using Anonymous authentication (this will always be used if
it is checked in IIS...even if you have Windows Integrated checked) you
will be running the thread as the IIS Anonymous user. Based on the
information you provided, it looks like this is what is happening for you.
A second choice would be to specify the user you want to impersonate, but
there is an additional step needed in order to get this to work. You will
have to add the ASPNET user to the policy called "Act as a part of the
Operating System" and then refresh the policies on the machine.

Here is an article that covers the three impersonation choices. There is
only one of the three that can be done without the policy I mentioned above
and it is simply <identity impersonate = "true">

306158 INFO: Implementing Impersonation in an ASP.NET Application

This posting is provided "AS IS" with no warranties, and confers no rights.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Integrated Windows Authentication, ASP.NET and FoxPro Amedee Van Gasse ASP .Net 2 06-16-2005 03:33 PM
DirectoryServices and Windows Integrated Auth. Mohamed Zaki ASP .Net 1 06-29-2004 03:25 PM
Intranet and Integrated Windows Authentication Andrew ASP .Net 4 06-22-2004 11:22 PM
HttpHandler and Windows Integrated Security Carlos Fersura ASP .Net 0 10-29-2003 08:17 PM
Windows Integrated Security and wireless STom ASP .Net 0 10-08-2003 06:36 PM