473,320 Members | 1,872 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,320 software developers and data experts.

Type not defined error

I'm getting the following compilation error on the line of vb.net script in
the aspx code below.

Compiler Error Message: BC30002: Type 'DirectoryEntry' is not defined.

Dim dirEntry As new DirectoryEntry(strLDAPPath)
I have System.DirectoryServices added to the project references and to the
aspx form. The autogenerated code includes "Imports
System.DirectoryServices" in the source. I get the same error with the
fully qualified reference "...as new
System.DirectoryServices.DirectoryEntry(strLDAPPat h)."

Any idea what's need to get the compiler to see the reference?
Nov 18 '05 #1
1 4309
I had no problems compiling the code.

This is what I did:
I created a new "ASP.NET Web Application" project.
I added a reference to "System.DirectoryServices.dll"
In the code for the default form I added "Imports
System.DirectoryServices" as the first line of code.
In Sub Page_Load I added this code:
Dim dirEntry As New DirectoryEntry("something")
Then I built the project, with no errors.

So the default settings for the project should be fine.

"J Quick" <JQ****@noemail.nospam> wrote in message news:<eB**************@TK2MSFTNGP09.phx.gbl>...
I'm getting the following compilation error on the line of vb.net script in
the aspx code below.

Compiler Error Message: BC30002: Type 'DirectoryEntry' is not defined.

Dim dirEntry As new DirectoryEntry(strLDAPPath)
I have System.DirectoryServices added to the project references and to the
aspx form. The autogenerated code includes "Imports
System.DirectoryServices" in the source. I get the same error with the
fully qualified reference "...as new
System.DirectoryServices.DirectoryEntry(strLDAPPat h)."

Any idea what's need to get the compiler to see the reference?

Nov 18 '05 #2

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

Similar topics

15
by: Terje Slettebř | last post by:
Hi. I'm new here, and sorry if this has been discussed before; I didn't find it searching the PHP groups. (I've also read recommendations to cross-post to the other PHP groups, but if that is...
1
by: Olle Lundin | last post by:
Hi I´m trying to encapsulate a type in a class but I´m getting this error message (Compiler error), could you please explain what I´m doing wrong. /Olle Compile error: Only public user...
21
by: Nitin Bhardwaj | last post by:
Hi all, It is said that C++ is a strongly typed language and thus a type-safe language (unlike C). So how does one explain the following behaviour : int main(void) { char *p = NULL; p = "A...
5
by: Chris | last post by:
Hi everyone, I have an error message in an Access 97 database & I was hoping someone may be able to help me get rid of it (bearing in mind I only have an average understanding of Access &...
11
by: MLH | last post by:
I copied the following code snippet from A97 HELP. Am getting an error at compile time suggesting there's a problem with the first line (compile error, user-defined type not defined). It is likely...
1
by: Ghost | last post by:
Hi all, I wrote a program in C# and now I have to "translate" it i visual C++ (MFC) using .NET, but I had a little problem: *ERRORS* error C3181: 'CTestDlg' : invalid operand for __typeof,...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
7
by: Sky | last post by:
I have been looking for a more powerful version of GetType(string) that will find the Type no matter what, and will work even if only supplied "{TypeName}", not the full "{TypeName},{AssemblyName}"...
4
by: JackBlack | last post by:
Hi, all! Need a little help tracking down a runtime error problem. I'm getting this error: "Unable to cast object of type 'myStruct' to type 'myStruct'... but the two types are identical! I...
5
by: Anuz | last post by:
Hi all, While compiling a driver, I am getting this error: error: dereferencing pointer to incomplete type int __kc_adapter_clean(struct net_device *netdev, int *budget) { /*some...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.