Use System.DirectoryServices from classic asp

J

jrsrls

I need to authenticate against AD from a classic asp site. I've
created a C# project that runs as an exe and successfully authenticates
using DirectorySerivces with the entered credentials. When I add the
code to a class (.dll) and register the object with regasm and gacutil
the asp page successfully calls the object but I cannot bind to AD.

I get the following message. "The specified domain either does not
exist or could not be contacted"

I think it is because of the permissions the object is running under
but I do not know how to get around it. I can't change the settings on
the web server which is set to anonymous access.

Any thoughts or suggestions?
 
J

Joe Kaplan \(MVP - ADSI\)

This is probably because the identity that is running the code is not a
domain account and your code is using serverless binding (no server or
domain info in the binding string; just a DN).

You might try adding the DNS domain name of the domain to your ADsPath:
LDAP://yourdomain.com/RootDSE

instead of LDAP://RootDSE

Note that ASP has ADSI and the OpenDsObject method. You could have just
called that instead of going through the trouble of doing a COM callable
wrapper. S.DS just calls ADSI anyway!

Joe K.
 
J

jrsrls

Joe,

Thanks for the response. That was the problem. I added the DNS and all
is well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top