WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Errors 1001 and 1026

Keywords:   Errors 1001 and 1026 

Question:

One of my programs bomb out with an error 1026 - ADSI cannot find specified path. But you reported to me in a post under the Winbatch board the following:

"Error 1001 is reported by the ADSI provider and indicates that you have a bad ADSI path.

This could mean that the path string is poorly formed or references a non-existent ADSI object."

I am trying to figure out which error is which?

Answer:

Good question. Maybe I should explain a little about how we handle errors in the ADSI extender.

The ADSI extender has 2 kinds of error messages: those with numbers between 100 and 1000 and those with numbers above 1000.

The former are errors that the extender detects by examining function parameters and seeing, if things make sense. They also include some generic errors that are common to most WinBatch extenders. The problem with this kind of error detection is that some ADSI providers expose more functionality than others and handle ADSI objects differently. The ADSI extender is forced to the lowest common denominator when it comes to error detection.

In order to (hopefully) provide more meaningful error messaging, we created the second set of errors i.e., those above 1000. These errors are a collection of error codes that known ADSI providers and components generate. We have made the attempt to add meaning full text to these error codes based on available documentation.

When the extender can't figure out what the problems is and it can't find a matching error code in it's table of known ADSI error codes, it querys the operating system to see if the OS has any error information for it. All errors based on this query have the number 1026. In your case the provider writer chose to use the OS ADSI error instead of the ADSI router error(1001). The extender probably can trap that OS error and consolidate it with the error table. Another task on the list...

My best guess is the error is as listed below with Microsoft's explanation. Note: Microsoft's information is delimited by >>> and <<<.

>>>
The name limit for the local computer network adapter card was exceeded.

[Kernel32]

The number of names allowed on the network adapter card for the local computer was exceeded.

Perform one of the following actions, then retry the operation: (1) disconnect from any resources that you are not currently using; or (2) reconfigure the network adapter card. If neither of these actions correct the problem, contact your network administrator.
<<<

This my be a red-herring because the providers will sometimes cough up off the wall error codes. Hope this helps. As we get more user feed back we hope to be able to improve error handling. Because ADSI is so flexible and generic it will always be a bit of a challenge.

If you are interested in looking at more ADSI error information, the ADSI extender does report provider supplied extended error information. Look in your Windows system directory for the file WWWBATCH.INI which is usually found in the Windows directory near to the win.ini file. In a section called "[ADSI Extender]" you will find a dump of the last ADSI error's extended error information. It contains an error number, error text and the name of the ADSI provider that produced the error. Be advised that the error text is not particularly useful many times. Also, not all errors produce extended errors, so the text in the file is from the last error that did produce extended information. If you want to make sure that the extended error information is from the error you are interested in, delete the file and recreate the error.

I hope all this ramble is of some use.


Another Question re: 1026 error:

I have a Winbatch script using ADSI extender which fails only when running on a workstation logged in with local admin account. If I logon with domain account it works great, but I need it to run logged in as local admin. The following is excerpt from script:
sAdsiPath = "LDAP://CN=Computers,DC=xxx,DC=yyy,"
DsSetCredent("user@UPN","pwd")
sContainer = dsGetChildPath(sAdsiPath,"")
I get "1026 error - the specified domain either does not exist or could not be contacted"

I have verified the account used with DsSetCredent is valid and has access to AD. As I said this errors if I use local admin account.

Thanks in advance for any help !!

Answer:

Found it. Actually the information in the article above gave me a clue. It states "ADSI extender processes your serverless path calls by finding the domain associated with current security context". Of course running with local admin, It would not be able to find a domain and hence the 1026. So the answer is cannot use serverless adsi path. Modified code to set server in ADSIPATH
sAdsiPath = "LDAP://dcname/Dc=xxx,Dc=yyy"
and it worked like a champ !!
Article ID:   W14514
Filename:   Errors 1001 and 1026.txt
File Created: 2001:11:21:14:19:52
Last Updated: 2001:11:21:14:19:52