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

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top