Microsoft IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsSystem AdministrationMicrosoft IIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 3rd, 2006, 12:58 PM
swimmerone swimmerone is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Location: New Hampster
Posts: 1 swimmerone User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 47 sec
Reputation Power: 0
LDAP Script works in Vbscript, not in IIS Web Page

I am trying to connect via LDAP to AD. I’m using Getobject("LDAP://RootDSE") from an ASP page on the IIS Dev box. The error I keep getting is 8007054b, which translates into "The specified domain either does not exist or could not be contacted."
I can run the same code in a vbs script and have no errors and return the data I want. I can run that script locally, server side or even from inetwww on the dev box. As soon as the code is ensconced in a web page, it fails.

I found a post on ASP Free with the same problem, entitled “8007054b error accessing RootDSE from asp” where members SerialHobbyinst and Doug G, et al, discuss the problem and provide a solution involving going “into active directory users and computers and mark the server that is serving those pages as "Trust this computer for delegation" on the general tab
then on the IIS website you go into properties and edit directory security so that no anonymous access is granted and select windows authentication and then it will be the user logged on to the computer that gets authenticated to AD when querying LDAP”,

I can’t make the change suggested in my environment.

However, myobj = GetObject(“LDAP:”) is successful.

Can someone help with this? Here is what I'm thinking:

1. After myobj = GetObject(“LDAP:”) is successful, and I query ‘LDAP://dc=DCone,Dc=DCtwo’, the new error message says, "Table not found". I assume it’s because I having provided the full path – but is there another reason?
2. Of course, strMyDNS=Get.myobj(“DefaultNamingContext”) fails. Is there an alternative property?
3. How do I obtain the full path since I do not have the RootDSE object? I’ve tried ‘LDAP://CN=Schema,CN=Configuration, DC=DCone, DC=DCtwo’ and ‘LDAP://CN=CN=Aggregate, CN=Schema,CN=Configuration, DC=DCone, DC=DCtwo’
4. Is there another way you might suggest to get the queries to work?

Thanks for your help.

Reply With Quote
  #2  
Old August 3rd, 2006, 01:40 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
ASP Free God 15th Plane (12000 - 12499 posts)
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 12,025 Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level)Memnoch User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 3 Weeks 6 Days 12 h 15 m 49 sec
Reputation Power: 628
Quote:
Originally Posted by swimmerone
I can’t make the change suggested in my environment.

Why not?

Reply With Quote
  #3  
Old October 1st, 2009, 10:31 AM
jlgazcon jlgazcon is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 1 jlgazcon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 50 sec
Reputation Power: 0
This script works for me in Classic ASP Vbscript to authentication in LDAP - iPlanet

struser= "your_user"
strpwd= "your_user_pwd"
strdomain= "your_domain.com"
strvaliddn= "uid=" & struser & ",ou=People,o=" & strdomain & ",o=isp"
strservername="your_server_name_or_ip:389"


Set conn = CreateObject("ADODB.Connection")
conn.Provider = "ADsDSOObject"
conn.Properties("User ID") = struser
conn.Properties("Password") = strpwd
conn.Open "ADs Provider", strvaliddn, strpwd

Set objldap = CreateObject("ADODB.Command")
objldap.ActiveConnection = conn
on error resume next
objldap.CommandText = "SELECT cn FROM 'LDAP://" & strservername & "/" & strvaliddn & "' "
set rs = objldap.Execute

If rs.eof or rs.bof then
authresult=""
else
authresult="Y"
end if

set objldap=nothing
set rs=nothing
Set conn=nothing

Reply With Quote
Reply

Viewing: ASP Free ForumsSystem AdministrationMicrosoft IIS > LDAP Script works in Vbscript, not in IIS Web Page


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek