473,624 Members | 2,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error using System.Director yServices

On my ASP.NET 2.0 website project on VS 2005, I am getting the following
error when building the solution:

“The type or namespace name 'ADSI' does not exist in the namespace
'myNameSpace' (are you missing an assembly reference?)”

I do have the following added to my web.config file:

<add assembly="Syste m.DirectoryServ ices, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= B03F5F7F11D50A3 A"/>

The build was working ok before I added another website project to the
solution. I am using Visual SourceSafe 2005. I had to checkout the solution,
add the new website project to the Visual SourceSafe and check in the
solution.

Environment: Windows XP professional SP2, .NET Framework 2.0, VS 2005 SP1, C#

Any help will be appreciated.

Thanks,
Nam
Jan 9 '08 #1
2 4673
It sounds like you have a reference to something other than
System.Director yServices, as that assembly and namespace don't use the name
ADSI anywhere. Do you have an interop assembly for activeds.tlb or
something?

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Nam" <Na*@discussion s.microsoft.com wrote in message
news:72******** *************** ***********@mic rosoft.com...
On my ASP.NET 2.0 website project on VS 2005, I am getting the following
error when building the solution:

"The type or namespace name 'ADSI' does not exist in the namespace
'myNameSpace' (are you missing an assembly reference?)"

I do have the following added to my web.config file:

<add assembly="Syste m.DirectoryServ ices, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= B03F5F7F11D50A3 A"/>

The build was working ok before I added another website project to the
solution. I am using Visual SourceSafe 2005. I had to checkout the
solution,
add the new website project to the Visual SourceSafe and check in the
solution.

Environment: Windows XP professional SP2, .NET Framework 2.0, VS 2005 SP1,
C#

Any help will be appreciated.

Thanks,
Nam

Jan 9 '08 #2
Joe,

Thank you for your response. You are correct. After reading your response, I
found out that our code is referencing to myNamespace.ADS I. I have a backup
copy of my website project. After I copied the backup copy of my project to
the working folder (we are using Visual SourceSafe), the solution compiled
successfully again. So, I am still not clear as to why the project was giving
the compile error mentioned in my original posting. I had checked that all
the references were there.

Nam
"Joe Kaplan" wrote:
It sounds like you have a reference to something other than
System.Director yServices, as that assembly and namespace don't use the name
ADSI anywhere. Do you have an interop assembly for activeds.tlb or
something?

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Nam" <Na*@discussion s.microsoft.com wrote in message
news:72******** *************** ***********@mic rosoft.com...
On my ASP.NET 2.0 website project on VS 2005, I am getting the following
error when building the solution:

"The type or namespace name 'ADSI' does not exist in the namespace
'myNameSpace' (are you missing an assembly reference?)"

I do have the following added to my web.config file:

<add assembly="Syste m.DirectoryServ ices, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= B03F5F7F11D50A3 A"/>

The build was working ok before I added another website project to the
solution. I am using Visual SourceSafe 2005. I had to checkout the
solution,
add the new website project to the Visual SourceSafe and check in the
solution.

Environment: Windows XP professional SP2, .NET Framework 2.0, VS 2005 SP1,
C#

Any help will be appreciated.

Thanks,
Nam


Jan 10 '08 #3

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

Similar topics

4
662
by: David Moore | last post by:
Hello I am using the System.DirectoryServices namespace classes to access Active Directory. We connect using the LDAP://DOMAIN method. The code works on local dev boxes, and in staging, but doesn't work on a particular box in our production environment. When we try to connect and do a search, we get a "The authentication mechanism is unknown" error. I have searched on Google, Microsoft Support Knowledge Base and Yahoo etc, and found this...
5
24707
by: Dave | last post by:
Hi All C# ADSI samples that I run cause unspecified errors. If I translate them into VB.NET they run fine. Here's an example: public string getEmail(string LDAPPath, string username) { DirectoryEntry entry = new DirectoryEntry(LDAPPath);
1
1717
by: Enosh Chang | last post by:
Hi all, I encounter some problem in DirectoryServices, could someone help me? private void InitLoginUser() { DirectoryEntry objEntry = new DirectoryEntry(); DirectorySearcher objSearcher = new DirectorySearcher(); SearchResult objResult;
9
3168
by: Patrick | last post by:
I have an ASP.NET page that searches for someone in the corporate Active Directory. It had been working fine until recently when I changed from Basic Authentication on IIS6 back to Integrated Windows authentication. The error occurs on the FindAll method. The exceptions are as follows. anyway of getting the code working with Integrated Windows authentication (too annoying for user to enter user-name/password). Note I do need to use...
6
2786
by: Tomas | last post by:
I'm trying in ASP.NET web page load user accounts from active directory. When I'm developing on local web server it works. I'm using authentication mode=windows and identity impersonate=true When I put page and DLL on server I get COMException. I try to run it on Win2000 server and Win2003 server and I get the same results (COMException) Can anyone help ?
2
3413
by: Jay | last post by:
Hi, This is Jay Mehta. I have this problem when using LDAP. I extract names and EmailId's of all those present from LDAP and populate in a datagrid. Now when run locally, it is running properly. But when put on Web Server and try to access it from client machines, it is giving the Error as "An Operation Error Occured".
0
1122
by: rcoco | last post by:
I'M HAVING THIS PROBLEM WITH MY WEBSITE, I DEPLOYED IT ON TO TE SERVER AND ON THE SERVER IT WORKS WELL BUT WHEN i TRY TO INSERT DATA WHEN ON CLIENT I GET THIS ERROR: System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +705 System.DirectoryServices.DirectoryEntry.Bind() +10 System.DirectoryServices.DirectoryEntry.get_AdsObject() +10 System.DirectoryServices.PropertyValueCollection.PopulateList() +234...
0
1121
by: rcoco | last post by:
Hi, I'M HAVING THIS PROBLEM WITH MY WEBSITE, I DEPLOYED IT ON TO TE SERVER AND ON THE SERVER IT WORKS WELL BUT WHEN i TRY TO INSERT DATA WHEN ON CLIENT I GET THIS ERROR: System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +705 System.DirectoryServices.DirectoryEntry.Bind() +10 System.DirectoryServices.DirectoryEntry.get_AdsObject() +10
0
1425
by: rcoco | last post by:
I'M HAVING THIS PROBLEM WITH MY WEBSITE, I DEPLOYED IT ON TO TE SERVER AND ON THE SERVER IT WORKS WELL BUT WHEN i TRY TO INSERT DATA WHEN ON CLIENT I GET THIS ERROR: System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail) +705 System.DirectoryServices.DirectoryEntry.Bind() +10 System.DirectoryServices.DirectoryEntry.get_AdsObject() +10 System.DirectoryServices.PropertyValueCollection.PopulateList() +234
0
1281
by: Chris Auer | last post by:
I am try to get information from AD from within MOSS. My app is strongly typed, marked as SAFECONTROL in the web.config and the dlls are in the GAC. But I get this error. Here is my code (very simple) public void TestSite() { DirectoryEntry AD = new System.DirectoryServices.DirectoryEntry("LDAP://
0
8173
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8679
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8475
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7159
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2606
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1785
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.