System.DirectoryServices Will not work

  • Thread starter Thread starter modica82
  • Start date Start date
M

modica82

I have a 2003 server setup for share point development with Visual
Studio 2005. I am trying to grab the current full name of the current
user logged into sharepoint but i cant get System.DirectoryServices to
register. I have made sure that it exists in the GAC which it does,
but i cant use the full reference path so even when i try and go

System.DirectoryServices.DirectoryEntry obj = new ....

i get an error saying that DirectoryServices does not exist. The
funny thing is i have a VS2003 machine and can reference that library
untill i am blue in the face with no problems.

Can anyone help me, do i need to install something (i have never
installed anything fancy with VS2003) or do i need to reference
something new to get this to work. The thing is this is also a
standalone file, not a project or anything like that as i was creating
a simple web part and just required a asmx file. so i added the
references manually.

Can someone help me please, i am pulling my hair out :'(

Rob
 
Have you added a reference to System.DirectoryServices into your project?
Maybe 2003 adds this by default. It is not added by default in my 2005 setup.
 
Have you added a reference to System.DirectoryServices into your project?
Maybe 2003 adds this by default. It is not added by default in my 2005 setup.

Hi Model,

Thanks for your reply.

I have tested that here on another machine with 2005 and even when i
add the reference to the project i still cant access it. Not sure how
i can go about adding it to my project to use this in my app.

Rob
 
Are you saying that you don't know how to add the reference, or that you did
add the reference and it did not fix the issue?
 
Are you saying that you don't know how to add the reference, or that you did
add the reference and it did not fix the issue?

Hi ModelBuilder,

Thats not the issue, adding the reference doesnt do anything i still
have the issue where the System.DirectoryServices namespace is still
not available so i cant run my code.

Rob
 
Back
Top