Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 24th, 2003, 10:14 PM
Authorized User
 
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to planeswalk
Default Unable to use System.DirectoryServices


Hi all,

I am trying to create a .NET app to administer IIS 5.0 and am trying to use the System.DirectoryServices namespace. I see lots of tutorials on the web but the main problem that I'm having is that I always get the following error:

Compiler Error Message: BC30466: Namespace or type 'DirectoryServices' for the Imports 'System.DirectoryServices' cannot be found.

The only way that I can get this namespace to work is to copy the System.DirectoryServices.dll file and place it inside a /bin folder inside the app. Is this really necessary? Is there anything else that needs to be done on the server end (permissions, anything) so that the namespace can be normally called just like the other namespaces??

Many thanks,
Marlon
 
Old June 25th, 2003, 10:20 PM
Registered User
 
Join Date: Jun 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to jbrenn@friends.edu
Default

Add a reference to the project. The reference should be to System.DirectoryServices.dll.
 
Old June 26th, 2003, 04:22 AM
Authorized User
 
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to planeswalk
Default


Hi,

Thanks for the reply. I am only using Notepad to write my code because I don't have VS.NET yet. The way that I am adding the namespace is through my code-behind file like this:

    ...
    Imports System.DirectoryServices
    ...

The problem is that when I call the page it doesn't seem to find the namespace unless I explicitly place the DirectoryServices DLL in a /bin folder inside the app. Is there any other way to add a reference to a dll other than the Imports statement using VB.NET?

Thanks!!
 
Old June 26th, 2003, 07:22 AM
Authorized User
 
Join Date: Jun 2003
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try just putting 'DirectoryServices.' before the objects in the code in that namespace and not importing the namespace and see if it compiles. If you have problems with that, try re-installing the .net framework.

Quote:
quote:Originally posted by planeswalk


Hi,

Thanks for the reply. I am only using Notepad to write my code because I don't have VS.NET yet. The way that I am adding the namespace is through my code-behind file like this:

    ...
    Imports System.DirectoryServices
    ...

The problem is that when I call the page it doesn't seem to find the namespace unless I explicitly place the DirectoryServices DLL in a /bin folder inside the app. Is there any other way to add a reference to a dll other than the Imports statement using VB.NET?

Thanks!!

 
Old July 22nd, 2003, 08:08 PM
Authorized User
 
Join Date: Jun 2003
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to planeswalk
Default

Hi,

I was finally able to solve my problem, although the "solution" that I used, if you could call it one, was to include all the .NET framework DLLs to the batch file that I use to compile my component... :( As you might guess, it was A LOT, and I think that I just needed to reference a DLL or two aside from the System.DirectoryServices.dll comp to make it work, so I am still in the process of removing DLLs from the batch file in orer to see which DLLs I just need. I guess VS.NET automatically adds all the proper DLLs for you even if you just added System.DiretoryServices.dll as reference...

Anyway, thanks for the help!

Marlon
 
Old November 12th, 2004, 06:23 PM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am having the same problem as this user. System.DirectoryServices won't register. I am posting this application to a web site that I do not have rights to add a virtual directory and therefore I am unable to use Visual Studio.NET references. My other ASP.NET applications work with code behind. Is there no way to utilize the directory services using just .aspx and .vb?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to delete file System.IO.Delete error maricar C# 13 March 14th, 2014 06:50 AM
Insert System date and System Time -Form _TextBox cnkumar74 VB How-To 14 February 14th, 2007 10:52 AM
Unable to locate System.Runtime.dll anujrathi ASP.NET 1.0 and 1.1 Professional 0 June 15th, 2006 10:13 PM
Problem with System.DirectoryServices.SortOption Surre ASP.NET 1.0 and 1.1 Professional 0 March 8th, 2006 08:19 AM
Unable to use System.DirectoryServices planeswalk VB.NET 0 June 24th, 2003 11:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.