All I have a strange one here but should be easy for you. I have built a generic handler to provide a backend to a web page. When I run it locally, as in the VS environment, everything works fine. But when I deploy the application it says it can't find
a class, in this case User.
The project is just a web site based on the HTML5 broilerplate. My code, except for the handlers, is in App_Code. So the user class is in \App_Code\Model\User.cs. I am not using NameSpaces yet.
When I run the application the host returns a compiler error:
S0246: The type or namespace name 'User' could not be found (are you missing a using directive or an assembly reference?
When I run it locally, as in the VS environment, everything works fine.
Any thoughts?
the app is at http://www.seitmc.com/Demo/ and thanks for any help you may be able to offer.
I just moved all of my model classes into the LoginHandler.ashx and now it runs. What gives?
--UPDATE 2--
Added namespace to the classes and put them back into App_Code\Model\ and added a using statement to the handlers. The system immediately stopped working again.
1) When you deploye web site, you copied your we side folder to server directly or you publised web side and then move publised code to server.
2) if you are adding namespace to any class that namesplace will be used while access that class, so you may forgot to adding thoes reference before use
share your sample code so i will get more idea about your problem
Member
1 Points
11 Posts
Can find my classes?
Apr 12, 2013 02:31 PM|jd80104|LINK
All sorry for the cross posting but it seems like I have started it in the wrong place.
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/5c7b3077-5c81-4483-a75a-6c9bb38f6f3c/
Thoughts?
--Original Post--
All I have a strange one here but should be easy for you. I have built a generic handler to provide a backend to a web page. When I run it locally, as in the VS environment, everything works fine. But when I deploy the application it says it can't find a class, in this case User.
The project is just a web site based on the HTML5 broilerplate. My code, except for the handlers, is in App_Code. So the user class is in \App_Code\Model\User.cs. I am not using NameSpaces yet.
When I run the application the host returns a compiler error:
When I run it locally, as in the VS environment, everything works fine.
Any thoughts?
the app is at http://www.seitmc.com/Demo/ and thanks for any help you may be able to offer.
JD
Thanks JD LinkedIn: www.linkedin.com/in/johndsanders
--UPDATE--
I just moved all of my model classes into the LoginHandler.ashx and now it runs. What gives?
--UPDATE 2--
Added namespace to the classes and put them back into App_Code\Model\ and added a using statement to the handlers. The system immediately stopped working again.
This is crazy.
Any thoughts?
JD
Contributor
2770 Points
774 Posts
Re: Can find my classes?
Apr 16, 2013 02:19 AM|dhol.gaurav|LINK
Hi
There are some questation for you.
1) When you deploye web site, you copied your we side folder to server directly or you publised web side and then move publised code to server.
2) if you are adding namespace to any class that namesplace will be used while access that class, so you may forgot to adding thoes reference before use
share your sample code so i will get more idea about your problem
let me know if any query
Gaurav Dhol
Skype ID : dhol.gaurav