HighTechTalks DotNet Forums  

active directory authentication using ldap

ASP.net Security microsoft.public.dotnet.framework.aspnet.security


Discuss active directory authentication using ldap in the ASP.net Security forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
hharry
 
Posts: n/a

Default active directory authentication using ldap - 11-09-2007 , 05:35 PM






Hello All,

I am trying to add forms authentication to an asp.net website. I am
developing locally, than publishing the site to the web server.

Everthing works fine on my local machine in debug mode. I am able to
call up the login page, successfully authenticate against the remote
active directory database and then be re-directed to the requested
page.

The problem occurs when I publish the app to the web server. I call up
the application and get re-directed to the login page. I enter the
same credentials, but receive the following error: Unknown error
(0x80005000)

Development environment:
I am developing on my local machine and then publishing to a web
server. The web server is part of the domain xxx. I have a windows
account for this domain, a vpn connection and a mapped-drive which
enables me to publish.

I have enabled anonymous access for the virtual directory using the
default account IUSR.

I determined that the Active Directory root was YYY.xxx.com and then
set my LDAP connection string to:
LDAP://YYY.xxx.com/dc=xxx,dc=com

I have a vpn connection and to the web server and have mapped a drive
wheich allows me to publish.

I thought that the problem might be that the IUSR does not have
permission to access the Active Directory database. I tried changing
the anonymous account to my own domain account, but the same error
occurred.

Pointers appreciated...

thanks!


Reply With Quote
  #2  
Old   
Joe Kaplan
 
Posts: n/a

Default Re: active directory authentication using ldap - 11-09-2007 , 06:02 PM






Use the ActiveDirectoryMembershipProvider that comes with ASP.NET 2.0 and
follow the guidance on using it published by the patterns and practices team
on MSDN (easy search). Don't try to write this yourself. Your solution
likely will not be of the same kind of quality as the built in one.

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
--
"hharry" <paulquigley (AT) nyc (DOT) com> wrote

Quote:
Hello All,

I am trying to add forms authentication to an asp.net website. I am
developing locally, than publishing the site to the web server.

Everthing works fine on my local machine in debug mode. I am able to
call up the login page, successfully authenticate against the remote
active directory database and then be re-directed to the requested
page.

The problem occurs when I publish the app to the web server. I call up
the application and get re-directed to the login page. I enter the
same credentials, but receive the following error: Unknown error
(0x80005000)

Development environment:
I am developing on my local machine and then publishing to a web
server. The web server is part of the domain xxx. I have a windows
account for this domain, a vpn connection and a mapped-drive which
enables me to publish.

I have enabled anonymous access for the virtual directory using the
default account IUSR.

I determined that the Active Directory root was YYY.xxx.com and then
set my LDAP connection string to:
LDAP://YYY.xxx.com/dc=xxx,dc=com

I have a vpn connection and to the web server and have mapped a drive
wheich allows me to publish.

I thought that the problem might be that the IUSR does not have
permission to access the Active Directory database. I tried changing
the anonymous account to my own domain account, but the same error
occurred.

Pointers appreciated...

thanks!




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.