473,383 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

authenticate against AD

GC
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!
Nov 16 '05 #1
3 1939
http://msdn.microsoft.com/library/de...m_asp__net.asp

[Url may wrap]

"GC" <gc@gc.com> wrote in message
news:uQ**************@TK2MSFTNGP14.phx.gbl...
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!

Nov 16 '05 #2
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!

Nov 16 '05 #3
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" <gc@gc.com> wrote in message
news:uQ**************@TK2MSFTNGP14.phx.gbl...
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!

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Litening | last post by:
Hi Can someone please supply me with a program (perhaps the C source) that authenticates a user on AIX (against the password/shadow/security file(s))? So far I have the following from IBM,...
3
by: Ram | last post by:
How to Authenticate NDS server using C#
0
by: B111Gates | last post by:
OK I know this is a complex question so I will break it up. I know that SSPI is the prefered method of authentication, however if I use the sample provide by MS I cannot authenticate across...
2
by: J-T | last post by:
I need to create a webserivce which is able to talk to the following components: 1) Another webservice which is written by java and talks to its own backend database to authenticate the users...
0
by: Lajus Norvejikus | last post by:
Hi all, I want to develop a web service to authenticate user/pass against a Active Directory domain. I only don't know how to authenticate the credentials user enters against a AD domain. Anyone...
2
by: cashdeskmac | last post by:
FormsAuthentication.Authenticate(txtUser.Text, txtPassword.Text) I understand that you pass the parameters into this method and they are checked against the credentials in the config file. ...
1
by: fomalhaut | last post by:
Hi All, I'm builing an application that requires domain admin access to run, and I'm trying to allow for the application to be run as a normal user and allow the user to provide it with a...
1
by: Michael Howes | last post by:
I would think this would be very, very easy but in the 50 searches I've done I haven't found anything. If our application requires login and that user/password be a local windows account or more...
4
by: Jon | last post by:
I am modifying an app for a customer in ASP.Net 1.1. The app is running on a server outside their network, yet they want to authenticate users against their internal active directory set up (they...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.