JRockFL
asked on
BC30002: Type 'SurveyBLL' is not defined.
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()
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()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Does App_Code directory exist on the server? Are you deploying your project using aspnet_compiler?
--Nauman.
--Nauman.
ASKER
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.
I am using Visual Web Developer Express and used "Copy Web Site" to deploy it to the web server.
You will need to add the following directive to your ASPX page:
<%@ Assembly src="SurveyBLL.vb" %>
--Nauman.
<%@ Assembly src="SurveyBLL.vb" %>
--Nauman.
ASKER
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?
SurveyBLL.vb was not found.
It's in the App_Code folder, do I need to specify that path too?
What is the exact name of the .VB file for SurveyBLL.vb class?
--Nauman.
--Nauman.
ASKER
SurveyBLL.vb is the exact name of the file.
The references for 2.0 are stored in the web.config file.
Bob
Bob
ASKER
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='MachineTo Applicatio n' 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
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='MachineTo
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
Where did you get the web.config file from?
Bob
Bob
ASKER
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.
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.
That is acceptable, but if you need to find out where you were going wrong, we here to help.
Bob
Bob
ASKER
Thanks Bob!
ASKER
Public Class SurveyBLL
'Code
End Class
This is how I am doing it now, how should I call it?
Dim surveyBLL As New SurveyBLL()