Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 14th, 2004, 08:03 AM
Registered User
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Dear All

I have a problem with LDAP

i canno't connect to ldap from my machine

and this is my code

<%@ Language=VBScript %>
<%
Option Explicit
response.buffer = true
Dim con,rs,Com,objADsPath,objRootOU,objDomain,objADOU, rootDSE,dso,user,pass
rootDSE="sund.cyberia.net.sa:389/ou=mail policies,dc=ogertel,dc=com"





Set objRootDSE = GetObject("LDAP://sund.cyberia.net.sa:389/ou=mail policies,dc=ogertel,dc=com")
Objdomain=objRootDSE.Get("defaultNamingContext")



 Set con = Server.CreateObject("ADODB.Connection")

 con.provider ="ADsDSOObject"



 objADsPath =Objdomain.Get("DefaultNamingContext")


response.write objADsPath

 Set objDomain = Nothing



 con.open "objADsPath","cn=root","FriDec722:12:13GMT2001 "

  Set Com = CreateObject("ADODB.Command")
 Set Com.ActiveConnection = con
 Com.CommandText ="select mailid from 'LDAP://"+objADsPath+"' WHERE mail='maaz@cyberia.net.sa'"
 Set rs = Com.Execute

 Do While Not rs.EOF Or rs.BOF
   ReturnValue = rs.Fields(0)
   If IsArray(ReturnValue) Then
        For I = LBound(ReturnValue) To UBound(ReturnValue)
            If ReturnValue(I) <> "" Then
                Response.Write ReturnValue(I) & "<BR>"
            End If
        Next
  Else
        Response.Write ReturnValue & "<BR>"
   End If
   rs.MoveNext
Loop

%>


regards

 
Old December 20th, 2004, 02:43 PM
Registered User
 
Join Date: Dec 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Description, reason and solution from Microsoft Site: Article ID:311766

http://support.microsoft.com/kb/311766

NOTE: You'll have to make sure "Integrated Windows authentication" is checked if you uncheck "Anonymous access". Then when you access the page use a loacl administrator login/PW. Reasons why explained on MS website link above.






Similar Threads
Thread Thread Starter Forum Replies Last Post
WroxUnited not working with IIS Solved TieDyeGeek BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 October 13th, 2007 04:28 PM
C# If test not working RichardOrmiston C# 7 December 20th, 2005 08:18 AM
C# If test not working RichardOrmiston ASP.NET 1.0 and 1.1 Professional 0 December 18th, 2005 02:23 PM
why GetObject with IIS is not working alyeng2000 ASP.NET 1.x and 2.0 Application Design 0 September 15th, 2004 09:00 AM
Can't get IIS server test when setting up DWMX2004 richardv2 Dreamweaver (all versions) 6 June 11th, 2004 06:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.