Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / December 2004

Tip: Looking for answers? Try searching our database.

Help!  Error: Type 'DirectoryEnty' is not defined.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rich Rekos - 08 Dec 2004 18:37 GMT
I'm new to .Net and would like to start using .aspx pages to work w/ Active
Directory instead of classic asp.  I get this error when trying to run my
page:
Type 'DirectoryEnty' is not defined.

Can anyone tell me what is wrong?  My code below:

<%@Page Explicit="True" Language="VB" Debug="True" %>
<%@ Import Namespace="System.DirectoryServices" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>ASP.NET Temp User</title>
</head>

<script runat="server">
Sub add_user(sender As Object, e As EventArgs)

Dim strPath As String = "LDAP://OU=Belgium,DC=qmc,DC=com"
Dim myDE As New DirectoryEntry(strPath)

Dim myEntries As DirectoryEnty = myDE.Children.Add("CN=Test User", "user")

myEntries.CommitChanges()

End Sub
</script>

Many Thanks!!
Ben Lucas - 08 Dec 2004 19:20 GMT
The error is due to the misspelled "DirectoryEnty"  It is trying to tell you
that it doesn't know what "DirectoryEnty" is.  If you change it to
"DirectoryEntry" you should be able to compile your code.

Signature

Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com

> I'm new to .Net and would like to start using .aspx pages to work w/
> Active
[quoted text clipped - 26 lines]
>
> Many Thanks!!
Rich Rekos - 08 Dec 2004 19:29 GMT
Well I'll be darned!  Boy do I feel silly.  Thanks so much for lending me
your eyes!  

> The error is due to the misspelled "DirectoryEnty"  It is trying to tell you
> that it doesn't know what "DirectoryEnty" is.  If you change it to
[quoted text clipped - 30 lines]
> >
> > Many Thanks!!
Ben Lucas - 09 Dec 2004 00:13 GMT
No problem.

Signature

Ben Lucas
Lead Developer
Solien Technology, Inc.
www.solien.com

> Well I'll be darned!  Boy do I feel silly.  Thanks so much for lending me
> your eyes!
[quoted text clipped - 37 lines]
>> >
>> > Many Thanks!!
Marc Scheuner [MVP ADSI] - 09 Dec 2004 09:10 GMT
>Well I'll be darned!  Boy do I feel silly.  

A classic example of the PICNIC principle :-)

Problem In Chair, Not In Computer <big innocent grin>

Happens to all of us, rest assured - we're only humans, after all

Marc
================================================================
Marc Scheuner                        May The Source Be With You!
Bern, Switzerland                         m.scheuner(at)inova.ch

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.