Using System.DirectoryServices from within webservice

B

BT Ong

I am trying to access to my AD using LDAP in a ASP.NET web service.
I use System.DirectoryServices.DirectoryEntry.

However, when I try to open the asmx file in a browser, the following
compile error appears:
CS0234L: The type or namespace 'DirectoryServices' does not exist in the
class or namespace 'System' (are you missing a reference")

Does that mean I can't access the AD from within a web service?
 
D

DAve

I've run into the same problem and can't seem to find any information
as to why this error is being thrown. Anyone have an answer?

I get a compile error when inserting the line
using System.DirectoryServices;

in a c# .asmx file.

Thanks,
 
D

DAve

The problem is that I am creating the .asmx files outside of Visual
Studio and letting .net compile it when it's accessed. What does
Visual Studio add to the .asmx file that accomplishes the reference?
Does Visual Studio compile it and provide a non-text file to use
instead of an .asmx file?

Thanks for the help,

Dave
 

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,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top