Last post Jan 15, 2007 04:04 AM by GeorgeZ
Dec 21, 2006 11:24 AM|KillerApp|LINK
I have written a IHttpHandlerFactory class that looks at the url and loads the correct assembly (etc). It all works :)
However, one of the assemblies that gets loaded causes an InvalidProgramException (which is not the issue, I know how to fix it) and as soon as that exception is fired the assembly file is locked and cannot be updated. The only way to allow the loaded assembly
to be overwritten is to kill the ASP worker process. The flow is:
My IHttpHandlerFactory.GetHandler is called.
Loads the assembly, gets a reference to the IHttpHandler interface and returns it
The InvalidProgramException occurs
The IHttpHandlerFactory.ReleaseHandler is never called
Anybody any advice?
Dec 26, 2006 12:55 AM|George Ma - MSFT|LINK
Have you tried this:
IHttpHandler myhandler = myfactory.GetHandler ();
Dec 30, 2006 11:54 AM|KillerApp|LINK
Jan 14, 2007 09:39 PM|miztiik|LINK
I dont think ASP.NET runs the DLL from the root location, the framework makes a copy and runs the dll, this has two advantages,
one, you can update your code/appication/webserver without going offline. and the other one is if your server is under attack, you can simply kill that process and which wouldn't crash your entire application.
I see it more off a security feature.
Jan 15, 2007 04:04 AM|GeorgeZ|LINK
Can we catch it? Anyone?