Hi,
I'm using c# asp with Visual studio 2010 professional
I've created web site that works fine. Then I've added into APP_Code folder new Class names Globals.cs and tried to call it in order to use it like this:
In the file: Login.aspx.cs I've added:
using ParkingLabelsManager;
Then
public partial class LogIn : System.Web.UI.Page
{
private Globals mGlobals = new Globals();
If I runs it from the compiler (pressing F5) it run Okay.
But when I refers to C:\inetput\blablablas\logIn.aspx I'm getting the error:
The type or namespace name 'Globals' could not be found
Anu help will be very appriciate!!!
Best regards,
Yaacov
Loading
Amit ChoudharyPosted Dec 26, 2012, 7:00 AM
Check out this article:
http://vishaljoshi.blogspot.in/2009/07/appcode-folder-doesnt-work-with-web.html
Which is why your Globals.cs class is not getting compiled when you published it in the IIS. In debugging mode you're getting cause debugger is forcing each class to be compiled but in hosting environment things are not same for Asp.net folders.