DirectoryServices Namespace

G

Guest

Hi

I am trying to import the System.DirectoryServices namespace in an aspx page
with the following syntax

<%@ Import Namespace="System.DirectoryServices" %>

but as I tried to load the page, it was generating compiler error.

I have installed the 1.1 .NET framework SDK


Can anyone help, please?!

TIA

--
 
J

Joe Kaplan \(MVP - ADSI\)

You need an assembly reference to it as well. You can do that with the
Assembly directive or add a reference via VS.NET or add S.DS to your list of
assemblies in your web.config.

Joe K.
 
G

Guest

Thanks. But, can anyone give me the steps (sorry I am not .NET), please?

In fact, where can I find more information / doc about this (installing /
configuring) the SDK environment?

TIA

Joe Kaplan (MVP - ADSI) said:
You need an assembly reference to it as well. You can do that with the
Assembly directive or add a reference via VS.NET or add S.DS to your list of
assemblies in your web.config.

Joe K.
 
J

Joe Kaplan \(MVP - ADSI\)

The documentation is all in MSDN library which is available online at
msdn.microsoft.com.

You didn't say before, but if you are using VS.NET, you just need to add a
reference to the assembly via Add References. If you aren't using VS.NET,
you might want to consider using the web matrix tool as an IDE.

The assembly directive is documented here:
http://msdn.microsoft.com/library/d...us/cpgenref/html/cpconAssembly.asp?frame=true

Note that since S.DS is installed in the GAC, you'll need to use the full
type name for it:
<%@ Assembly Name="System.DirectoryServices, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" %>

Joe K.

Thanks. But, can anyone give me the steps (sorry I am not .NET), please?

In fact, where can I find more information / doc about this (installing /
configuring) the SDK environment?

TIA

Joe Kaplan (MVP - ADSI) said:
You need an assembly reference to it as well. You can do that with the
Assembly directive or add a reference via VS.NET or add S.DS to your
list
 
J

Joe Kaplan \(MVP - ADSI\)

I believe you spelled "neutral" wrong in your assembly directive.

Joe K.
<dl> wrote in message Joe, sorry that I am still having this error as attached? is it something
to do with deployment? I have never "deploy", I just copy to one of the
virtual directory, will there be any problem?

I can list that assemblies with this command "gacutil /lr
System.DirectoryServices", it list the exact wordings as the one you type
for the full type name, except with the following added to the end ",
Custom=null SCHEME: <WINDOWS_INSTALLER> ID: <MSI> DESCRIPTION :
<Windows Installer>"

TIA
 
G

Guest

Thanks Joe. Sorry for the typo I made.
I believe you spelled "neutral" wrong in your assembly directive.

Joe K.
<dl> wrote in message Joe, sorry that I am still having this error as attached? is it something
to do with deployment? I have never "deploy", I just copy to one of the
virtual directory, will there be any problem?

I can list that assemblies with this command "gacutil /lr
System.DirectoryServices", it list the exact wordings as the one you type
for the full type name, except with the following added to the end ",
Custom=null SCHEME: <WINDOWS_INSTALLER> ID: <MSI> DESCRIPTION :
<Windows Installer>"

TIA
 

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
474,140
Messages
2,570,810
Members
47,357
Latest member
sitele8746

Latest Threads

Top