cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2449
Views
0
Helpful
21
Replies

LDAPSearch - Server.CreateObject error

chp
Level 1
Level 1

Hi,

Does somebody know WHY my script which use 'LDAPSearch.LDAPSearchList' doesn't work ? There was no problem during the last 2 weeks and know, I get this message :

HTTP 500.100 - Internal Server Error - ASP error

Internet Information Services

--------------------------------------------------------------------------------

Technical Information (for support personnel)

Error Type:

Active Server Pages, ASP 0115 (0x80004005)

A trappable error (C0000005) occurred in an external object. The script cannot continue running.

/iptelephony/index.asp

Browser Type:

Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Page:

GET /iptelephony/index.asp?id=27289

Time:

Wednesday, February 09, 2005, 8:43:12 AM

More information:

Microsoft Support

I get this message one time, then.. IIS seems to be blocked for this virtual directory. There is no time out, no response.

21 Replies 21

KoosDuppen
Level 1
Level 1

I might have the same problem.

I also tried to use the

var s = new ActiveXObject("LDAPSEARCH.LDAPSearchList.1");

(based on the sample Cisco SDK example Click2dail)

and I recieve the error message:An exception occurred

(When I catch the exception)

<%@ Language=JavaScript %>

<%

Response.ContentType = "text/xml";

try

{

var s = new ActiveXObject("LDAPSEARCH.LDAPSearchList.1");

s.Server = "xxx.xxx.xxx.xxx"; (xxx=IP from the AD)

s.Port = xxx; (portnumber from the active directory

s.AuthName = "cn=xx o=xx"; (cn=common name/o=organisation)

s.AuthPasswd = "************";

s.SearchBase = "ou=users ";

s.SetOutputTitle("ActiveX Directory Search", 20);

s.SearchAll();

Response.Write(s.XMLOutput(0, 32));

}

catch(err)

{

Response.Write("Error: " + err.description );

}

Response.End();

Session.Abandon();

%>

Can someone help me out?

I need to access the AD trough LDAP... maybe there's a more efficient way to solve it...

please help me out.

Thanks in advance

yours sincerely

Duppen Koos

Student

This is from the Developer Support Newsletter (December 2003), which should be helpful. Developer Newsletters are available in the Cisco Developer Support site in the News Flash section.

http://www.cisco.com/pcgi-bin/dev_support/access_level/product_support

"Make sure that the your ActiveXObject is "LDAPSearch.LDAPSearchList" and that it does NOT contain a version 1 on the end. This is a problem with a couple of the sample scripts in the SDK - they try to create a version 1 component and the only version that exists is version 2.0 (the latest version that's bundled with the SDK).

By removing the version number, it will simply use the latest version installed."

So try changing this line:

var s = new ActiveXObject("LDAPSEARCH.LDAPSearchList.1");

to this:

var s = new ActiveXObject("LDAPSEARCH.LDAPSearchList");

and see if that helps...

Probably it's better by now, but I still recieve an error message I recieved before. It might be an internal problem, but I think it's worth posting: This is what I get...

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

Invalid at the top level of the document. Error processing resource 'http://koos.ferranti.be/1/example2.asp'. Line 1, Posi...

Error: Automation server can't create object

^

That's all the information I've got.

I write the script with HTML-kit (freeware)

and try to run them with IE 6.x

thanks in advance

Is the ldapsearch COM object registered with windows?

Refer to the CiscoIPServices\COMServers\LDAPSearch folder of the IP Phone SDK:

LDAP Search COM Server version 2.0

To install:

- Open a command prompt and change directory to the location of these LDAPSearch DLLs

- Register the COM server by entering 'regsvr32 LDAPSearch.dll'

'LDAPSearch.LDAPSearchList' is the common name used for automation object creation

Yes the ldapsearch com object was already registered... and now it sure is.

I'm trying other things that I can do to make it work.

I've put my problem in a .doc file. I hope it's clear.

You can contact me on koos.duppen@ferranti.be

Please help me.

Thanks in advandce

The first sample code from your document looks okay, and worked for me to connect to CallManager, though I had to set credentials and port 8404, and change the searchbase. After changing the credentials, the port, and the searchbase again, I was able to connect to an active directory.

Just a couple thoughts there:

Try setting the credentials (AuthName and AuthPasswd) properties. The properties you set in the last example from the document you posted should be okay, add them to your first example.

Also, try setting your searchbase one level lower in the hierarchy:

t.searchbase = "dc=ferranti,dc=be";

Finally, try closing your browser, and then open a new browser, which may clear any state or cache settings that might be affecting your changes...

Hi mr. aaronw

i donwloaded the IP Phone Services SDK v3.3(4) and then version of LDAPSearch is 1. what SDK version is bundle the version 2 of ldapsearch

thanks...

Hola David,

3.3(4) is the latest version of the SDK. The SDK has not been updated for a while, though most of the content still works, and what does not work can be "fixed". The ldapsearch component that comes with SDK 3.3(4) works with CallManager 4.0 and 4.1.

So the version of ldapsearch in SDK 3.3(4) should be the latest version available.

The example in the ldapsearch documentation is wrong, and appends the version of the ldapsearch component at the end. Instead of using a command like this:

var s = new ActiveXObject("LDAPSEARCH.LDAPSearchList.1");

try something like this:

var s = new ActiveXObject("LDAPSEARCH.LDAPSearchList");

If you do not put the version at the end, it will load the latest version of the ldapsearch component, which is in SDK 3.3(4).

Hi again..,

i know it. i checked the library reference and see that "LDAPSearch 1.0 Type Libray". is it ok ?

regards

Well I've tried, and tried... still no connection

I was wondering, how can I see that the connection is set?

the file name is like test.asp.

So I type in the iexplore

http://koos.ferranti.be/test.asp

what do I have to get?

I get:

The XML page cannot be displayed

Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

--------------------------------------------------------------------------------

Invalid at the top level of the document. Error processing resource 'http://koos.ferranti.be/test.asp'. Line 1, Position 1

Error: Object doesn't support this property or method

^

______________________________________________________________________________________________

I guess it is not the return I should get when I'm connected.

Thanks in advance

The reason that you get the "stylesheet" error is because you have set the content type to text/xml, but the web server is returning an error in HTML.

If you set the return type to text/html, that might help debugging (but don't forget to set it back to text/xml), though you don't need to as you can still see the ASP error under the stylesheet error. If you are using IE, you can also uncheck the "Show friendly HTTP error messages" checkbox in advanced options.

The reason you're getting the error (object doesn't support this property or method) might be because you are using a domain login and specifying the domain in front of the username. If you use Softerra to browse the ldap directory, find the path of the user you are logging in as (kduppe), and specify that as the auth name property:

for example:

cn=kduppe,dc=ferranti,dc=be

or

cn=kduppe,ou=finance,dc=ferranti,dc=be

You'll need to find the path to that user in your ldap directory, and use that instead of the domain\username format...

The error you are getting might also be caused by you using an unsupported function call on the COM object, but if you are using domain login, you'll have to use the DN format instead of the windows format anyway... so there's one step forward...

ok, the stylesheet error has disappeared, well... the error is still there, but the XML-style is gone.

Now I'm facing continues the same error.

Error: Invalid credentials,-7fff6fcf

I was wondering, if I can give you the information you need, could you help me out sorting out the right credentials?

I'm willing to try, so I'm posting all the information I thing you'll need.

Additional and maybe very important information: I'm using Windows 2003 AD.

with regards.

Koos Duppen

well, I think your authname should be:

s.AuthName="CN=Koos Duppen,CN=Users,DC=ferranti,DC=be";

HTH

Sascha

I makes no difference,

I tried already so much, with full details, with less details.

I still get the error, invalid credentials...

Invalid credentials means the information needed for the connection éh? isn't it?

Thanks