Getting Printers from AD error "Unknown error (0x80005000)" on Fin

G

Guest

I'm getting the following error:
Unknown error (0x80005000)

It gives this error on the line "results = searcher.FindAll()"

-----code------
Dim rootentry As New
System.DirectoryServices.DirectoryEntry"LDAP://mydomain.com/", "user1",
"pss1", AuthenticationTypes.Secure)
Dim searcher As New System.DirectoryServices.DirectorySearcher(rootentry)
searcher.PageSize = 500
searcher.Filter = "(&(objectClass=PrintQueue)(serverName=" &
"printerserver1" & "))"
Dim results As DirectoryServices.SearchResultCollection
results = searcher.FindAll()
-----code-----

This code works in VB.net when i run it as a windows application.
Please help!
 

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,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top