Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

BC30002: Type 'SurveyBLL' is not defined.

Posted on 2006-11-07
16
Medium Priority
?
358 Views
Last Modified: 2011-09-20
I am using .NET 2.0 on a Win2k server. I used the copy web site wizard to copy up the files.

I created a class in the App_Code directory called SurveyBLL and now I get this error when I run the page.
HELP! Everything works fine on the dev server, just not production.

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

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

Source Error:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Line 7:          Dim surveyBLL As New SurveyBLL()
0
Comment
Question by:JRockFL
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 3
16 Comments
 
LVL 25

Accepted Solution

by:
nauman_ahmed earned 2000 total points
ID: 17892503
Reference it using NameSpace.ClassName convention. How does the declaration of SurveyBLL look like?

--Nauman.
0
 
LVL 8

Author Comment

by:JRockFL
ID: 17892568
Thanks for the reply, not sure what you mean? I don't have it in a namespace.

Public Class SurveyBLL
  'Code
End Class

This is how I am doing it now, how should I call it?
Dim surveyBLL As New SurveyBLL()


0
 
LVL 25

Expert Comment

by:nauman_ahmed
ID: 17892633
Does App_Code directory exist on the server? Are you deploying your project using aspnet_compiler?

--Nauman.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Author Comment

by:JRockFL
ID: 17892648
Yes, the App_Code directory is on the server.

I am using Visual Web Developer Express and used "Copy Web Site" to deploy it to the web server.
0
 
LVL 25

Expert Comment

by:nauman_ahmed
ID: 17892758
You will need to add the following directive to your ASPX page:

<%@ Assembly src="SurveyBLL.vb" %>

--Nauman.
0
 
LVL 8

Author Comment

by:JRockFL
ID: 17892850
I added it, but then it gives me an error message
SurveyBLL.vb was not found.

It's in the App_Code folder, do I need to specify that path too?
0
 
LVL 25

Expert Comment

by:nauman_ahmed
ID: 17892988
What is the exact name of the .VB file for SurveyBLL.vb class?

--Nauman.
0
 
LVL 8

Author Comment

by:JRockFL
ID: 17893007
SurveyBLL.vb is the exact name of the file.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17893040
The references for 2.0 are stored in the web.config file.  

Bob
0
 
LVL 8

Author Comment

by:JRockFL
ID: 17893144
I added a web.config file to the web site and now I get a new error :(

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:


Line 24:             ASP.NET to identify an incoming user.
Line 25:         -->
Line 26:         <authentication mode="Windows" />
Line 27:         <!--
Line 28:             The <customErrors> section enables configuration
 
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17897219
Where did you get the web.config file from?

Bob
0
 
LVL 8

Author Comment

by:JRockFL
ID: 17897545
I just did "Add new item" and selected Web.Config file, it was the default structure.

I removed the web config file and just took the methods from my surveybll and moved them to the actual pages.

Thanks for your help.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17897562
That is acceptable, but if you need to find out where you were going wrong, we here to help.

Bob
0
 
LVL 8

Author Comment

by:JRockFL
ID: 17897595
Thanks Bob!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question