PC Review


Reply
Thread Tools Rate Thread

authenticate against AD

 
 
GC
Guest
Posts: n/a
 
      4th Jan 2005
I'm looking to build a web app that authenticates against my current active
directory. Anyone have any examples on how to do this? Thanks!


 
Reply With Quote
 
 
 
 
Kunal Das
Guest
Posts: n/a
 
      4th Jan 2005
http://msdn.microsoft.com/library/de...m_asp__net.asp

[Url may wrap]

"GC" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm looking to build a web app that authenticates against my current
> active directory. Anyone have any examples on how to do this? Thanks!
>



 
Reply With Quote
 
Scott Allen
Guest
Posts: n/a
 
      4th Jan 2005
GC:

Have you look at using <authentication mode="Windows"> in web.config?

--
Scott
http://www.OdeToCode.com/blogs/scott/

> I'm looking to build a web app that authenticates against my current
> active directory. Anyone have any examples on how to do this?
> Thanks!
>



 
Reply With Quote
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      4th Jan 2005
Not sure why you want to use the AD as authentication service?
I know this:
http://msdn.microsoft.com/library/de...m_asp__net.asp
gives you a sample how to use the AD as an authentication service, but it
isn't one, its a Directory Service.
And the sample is a receipt for failure, for the following reasons:

1. The sample is using a server-less bind against the root of the directory
service.
String adPath = "LDAP://DC=..,DC=.."; //Path to you LDAP directory server
- Server-less binding only works if the asp.net application run as a domain
identity (and impersonation disabled), it fails when run with a local
identity (SYSTEM, ASPNET you name it) because ADSI tries to connect to the
LDAP server on the local system (and I suppose you don't have IIS on the
same machine as the DC).
2. Suppose you could successfully connect, What if your otherwise valid
credentials (the credentials you want to authenticate) don't have access to
the AD root?
Something you should consider when you care about security. bummer! the
authentication fails because of an authorization issue not an authentication
failure.

Now let's suppose above is not an issue, a successful bind will transfer the
directory schema from the LDAP server to the ADSI client (here your asp.net
application) to be cached, and you are ready to search the DS, just like
it's done in the sample (see DirectorySearcher).
Here there are two issues:
- transferring the schema takes time and depends on the LDAP server load and
network connectivity.
- searching the account shouldn't be done as you are already authenticated
as a domain user when binding, so you know already that the credentials are
valid.

Not that there are other reasons for failure, but I hope you get the
picture.

Willy.

"GC" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm looking to build a web app that authenticates against my current
> active directory. Anyone have any examples on how to do this? Thanks!
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Authenticate? Scott Microsoft Outlook Discussion 1 21st Jul 2008 07:55 PM
Re-authenticate my XP OS =?Utf-8?B?QXJ0dXJv?= Windows XP General 6 23rd Nov 2006 06:47 PM
Can not authenticate yoshi Microsoft Windows 2000 RAS Routing 2 22nd Apr 2004 10:37 AM
Can't Authenticate XP Jim Walker Windows XP Help 6 18th Apr 2004 05:08 PM
RE: Cannot Authenticate Seaver Microsoft Windows 2000 RAS Routing 0 5th Aug 2003 03:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:41 PM.