A
accessing C# classes in App_Code
I've a simple aspx page whose code behind instantiates a simple class which
exists in a .cs file in the App_Code folder of my project. Runs fine in the
IDE. When I copy the app to my IIS server I get this error in my browser:
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: CS0246: The type or namespace name 'CustomClass'
could not be found (are you missing a using directive or an assembly
reference?)
Source Error:
Line 18: protected void Button1_Click(object sender, EventArgs e)
Line 19: {
Line 20: CustomClass c = new CustomClass();
Line 21: Label1.Text = c.GetMessage(TextBox1.Text);
Line 22: }
Source File: c:\Inetpub\wwwroot\AppCode_test\Default.aspx.cs Line: 20
What's up?
exists in a .cs file in the App_Code folder of my project. Runs fine in the
IDE. When I copy the app to my IIS server I get this error in my browser:
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: CS0246: The type or namespace name 'CustomClass'
could not be found (are you missing a using directive or an assembly
reference?)
Source Error:
Line 18: protected void Button1_Click(object sender, EventArgs e)
Line 19: {
Line 20: CustomClass c = new CustomClass();
Line 21: Label1.Text = c.GetMessage(TextBox1.Text);
Line 22: }
Source File: c:\Inetpub\wwwroot\AppCode_test\Default.aspx.cs Line: 20
What's up?