473,385 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

System.DirectoryServices Will not work

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

Aug 8 '07 #1
4 2436
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.

Aug 8 '07 #2
On 8 Aug, 18:36, ModelBuilder <ModelBuil...@discussions.microsoft.com>
wrote:
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

Aug 8 '07 #3
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?
Aug 8 '07 #4
On 8 Aug, 20:22, ModelBuilder <ModelBuil...@discussions.microsoft.com>
wrote:
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

Aug 9 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: bob | last post by:
Hi, Is this the right place to dicuss Visual Studio 2005 and .Net 2? I am try to implement a class (already using Windows Authentication) where I am given a user name and I return a list of...
12
by: hykim | last post by:
Hello, everyone. according to MSDN, there is any constructor of System.DirectoryServices.SearchResultCollection Class. if I implement DirectorySearcher.FindAll() method by myself, then how can I...
1
by: Jason Gleason | last post by:
I am using the following method in a web service that utilizes the system.directoryservices namespace: public ArrayList GetAllAppPools(){ System.DirectoryServices.DirectoryEntry apppools = new...
4
by: m96 | last post by:
hi, i'm trying to make a query to a ldap server (version v2 or v3 doen't matter) with c#. the query works just fine but the problem is that i can't read the custom attributes/fields, since .net...
0
by: Chris Frohlich | last post by:
All, I've built an Employee Directory with ASP.NET app that queries Active Directory for users and builds links with the results. What I'm seeing is really intermittent failures to bind to the...
2
by: Kelvin | last post by:
Hello I am using web matrix develop a login page through Active Directory but I cannot figure out why it is giving me an error when importing system.directoryServices. Any help will do! thank ...
6
by: Mark Rae | last post by:
Hi, I'm in the process of updating an ASP.NET v1.1 web app to v2. The app uses ActiveDirectory a great deal, and I'm trying to use the new System.Collections.Generic namespace where possible,...
1
by: sasikumarks | last post by:
Hi, Im using the following code to retrieve the user details from the AD server. But when i execute the code,it throws me the error. Please help me in this...
7
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I am using this code to get groups for a user and getting a error (5) on the GetAuthorizationGroups() function . There are two domains. This function works on the local domain but does not work...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.