System.DirectoryServies can not be found

S

Saqib Ali

I trying to build a asp.net development env on my XP laptop to off-load
the development from our Win2k3 IIS development server.

I installed,
..net 2.0 SDK
IIS for XP
configured asp for net


but when i try to run my aspx web pages on the laptop, I get the
following error msg upon importing the System.DirectoryServices
namespace:

"Namespace or type specified in the Imports 'System.DirectoryServices'
doesn't contain any public member or cannot be found. Make sure the
namespace or the type is defined and contains at least one public
member. Make sure the imported element name doesn't use any aliases."

I think I am missing some piece, but I am not sure what. I didn't
install our dev servers, so I am not sure what other pieces are needed.

If I don't import the System.DirectoryServices namespace, then the app
works fine.

Any help would be greatly appreciated.

Thanks
Saqib
http://www.full-disk-encryption.net
 
J

Joe Kaplan

You need to add an assembly reference to it first. It isn't a default
assembly. You can either do that with an Assembly page level directive or
via the web.config file using the <assemblies/> element. Both are
documented in the SDK docs. VS also makes this easy for you, so maybe you'd
like to try using one of the free versions?

Joe K.
 
S

Saqib Ali

Thanks Joe !!! :)

I realized that I had forgot to define the Assembly in web.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.DirectoryServices, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
</system.web>
</configuration>

saqib
http://www.full-disk-encryption.net
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top