Re: AD queries. Please, prove me being wrong...



Yes, you can do this. If you want to impersonate the authenticated user
from IIS and use those credentials to query AD, then you must configure
Kerberos delegation in AD to allow the web app to have the rights to
delegate the user's credentials to AD. Since you are using Win2K web
server, you cannot use protocol transition (Kerberos S4U), so that also
means that you must ensure that you use IWA auth in IIS and ensure that IWA
is using the Kerberos protocol to authenticate the browser user, not NTLM.

This type of scenario is much easier to get working in IIS 6 than IIS 5, but
it can be made to work on Win2K if you are stuck with that as your web
server platform. There are many documents on MS support, MSDN and TechNet
that explain how to configure Kerberos delegation in a web application and
there are also good troubleshooting guides available. It takes a while to
learn all the details that are required to understand how to configure and
troubleshoot this, but it can be done.

Best of luck!

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"JKruza" <JKruza@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:796AE179-A255-4796-A61C-89CB41BC2D2C@xxxxxxxxxxxxxxxx
Hello!

I have intranet web app in ASP.NET 2.0. IIS is set to require "Windows
Integrated" or "Digest against AD" authentication. ASP.NET auth mode is
"Windows", impersonation is set to true.

Up to this moment everything works just fine.

The problem is, that i can't query AD in any way without providing user
credentials.
I tried both direct LDAP queries trough DirectoryEntry and
ActiveDirectoryMembership, in every case username and password was
required.
I simply can't find any info or example not using credentials...

Additional info:

Server: Windows Server 2000 with IIS and ASP.NET

User I'm impersonating with is domain user and belongs to "Administrators"
group on this server. (Target is to auth. and impersonate with any domain
user...)

Code security trust level is "Full".

Launching console or windows app reusing the same code on this server
works
fine without providing credentials.

Because of the company policy I can't hardcode (or put in config)
credentials of any domain user... :(

Again: Is this possible to query AD trough LDAP without providing
credentials from ASP.NET 2.0 app? I'm starting to doubt...


Thanks in advance,
JK



.



Relevant Pages

  • Re: Windows authentication from ASP.NET to SQL Server
    ... > The reason for this is that NTLM authenticates credentials under IIS ... > IIS never receives the credentials and cannot forward them for delegation. ... But why can't I use Kerberos authentication? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Proxy auth with default credentials
    ... What I thought I could do was just impersonate the user on IIS, ... configure the proxy's credentials to DefaultCredentials (which should ... the impersonated user to a NetworkCredential object I can use. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Windows authentication from ASP.NET to SQL Server
    ... ¤> If your ASP.NET app is configured for Integrated Windows security, ... ¤> by IIS to the remote database server w/o implementing Kerberos. ... ¤> The reason for this is that NTLM authenticates credentials under IIS ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Active Directory Authentication in IIS 6
    ... I just installed ldp.exe and have no problems using the same credentials ... used in the code to connect and bind. ... settings in IIS, but I am not sure where to look. ... and Integrated Windows Authentication is checked. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: IIS6 - Virtual Directory to URL share, authentication problems.
    ... passing credentials across from webserver -> remote file server ... requires Kerberos (if IIS doesn't have the user's password), ... you won't get automatic logon. ... is that the "secure" authentication mechanisms do ...
    (microsoft.public.inetserver.iis.security)