I have a Config.cs
file inside the App_Code
folder:
namespace C
{
public class Config
{
......
}
}
In my default.aspx.cs page, I added using C;
but I can't load the page. It says:
CS0246: The type or namespace name 'C' could not be found (are you missing a using directive or an assembly reference?)
I'm using CodeFile instead of CodeBehind and I already tried to set the Build Action property to Compile
but I cant find that option in the class properties page. I am using VS 2012.
It works fine though when I press F5 in VS 2012 and access my site under that port. It only show error when I try to access my page directly, as any other user would try to.