Last post Oct 11, 2006 05:49 PM by subdigital
Oct 09, 2006 01:42 AM|wasimf|LINK
I have a web service project witch include HttpHandler class. In the we config I added the HttpHandler element required :
<add verb="*" path="*.jpg" type="MyHttpHandler.ImHandler"/>
All the time I get : couldn't load MyHttpHandler.ImHandler.
I add the assembly name that exsists in the project bin directory :
<add verb="*" path="*.jpg" type="MyHttpHandler.ImHandler,App_Code.dll"/>
I got : Could not load file or assembly 'App_Code.dll' or one of its dependencies. The system cannot find the file specified.
It seems like can not find this file somewhere related to this project.
1. Where is the compiled code of the Handler class exsist, is in the web service App_Code.dll file or other ?
2. i deploy this project to IIS 5 and I still get the same thing like the visual studio 2005 web server error.
3. What can be the problem?
Oct 11, 2006 05:49 PM|subdigital|LINK
First, an assembly refers to a .dll file, but doesn't mean that you have .dll in the assembly name.
So the assembly System.Web corresponds to the file System.Web.dll
so if I wanted to reference a type within that dll in the config.. I'd write:
which means SomeClass from the namespace System.Web.UI from the assembly System.Web
the 2nd issue is that I don't think your assembly is App_Code, I think it gets the same assembly as your web project. I'd recommend doing away with the crappy App_Code folder and move to a real project structure.
Time to get away from that scary App_Code folder!
Either download the SP1 preview of Vistual Studio 2005, or download Scott Guthrie's Web Application Project add-on. Instead of saying File-> new Website... you'd create a new Project -> Web Application Project.
Either that or place your webservice classes in another assembly and keep your web service project very thin.