Classes in my App_Code folder are not being found - Website not WAP

Frusciante1 used Ask the Experts™
I have created classes in a given namespace (helpdesk). The class is in a subfolder of App_Code. I need to import the classes however, the namespace cannot be found and I am being asked if I am missing an assembly reference.

How can I import this class when dll's aren't generated for classes inside of App_Code? When it is run locally it is fine but on the web server the error occurs.

Thanks :)
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Did you add reference (In Solution Explorer, right click the reference, add)? I assume you have 2 separate project and you want to import classes from one project to another.


I cant find it when Ive tried the 'add reference' and no I dont have to seperate projects.

I tried taking the class out of the app_code and the app now runs on the web server but it cant locate the namespace.
Line 13: using System.Web.UI.HtmlControls;
Line 14: using System.Net.Mail;
Line 15: using helpdesk;
Line 16: 
Line 17: 


CS0246: The type or namespace name 'helpdesk' could not be found (are you missing a using directive or an assembly reference?)

Open in new window

When you say it runs fine locally, do you mean in the VS.Net development web server?  If so I have two guesses:
1. you are copying your code to a subfolder of an existing website but the subfolder is just a regular directory and not an application directory.

2. The iis site you are copying the application to is configured for the 1.x framework instead of the 2.x framework



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial