In my West Wind Web Store app I have an HTTP handler that manages redirecting links from our old store to the current store. The old store used a custom URL extension (.wws) and so the new version simply maps the .wws extension to the ASPNET_ISAPI.DLL and then handles the extension in Web.Config to point at this HTTP handler. The Handler does a little bit of URL fix up and then simply does a Server.Execute() to run the proper mapped ASPX page.

 

I implemented this HTTP handler in my Web project so in the past it was part of the project DLL in this case wwWebStore.dll. The Http Handler hookup looks like this:

 

    <httpHandlers>

       <add verb="*" path="*.wws"

            type="Westwind.WebStore.PageRedirectorHTTPHandler,wwWebStore" />

     </httpHandlers>

 

wwWebStore.dll is the name of the old assembly and my project output assembly.

 

Well, in ASP.NET 2.0 there is no longer a single output assembly, so this breaks in 2.0. In ASP.NET 2.0 any non-page/control code needs to be placed in the APP_CODE directory of a project and ASP.NET compiles this code separately.

 

Thankfully all code in the APP_CODE directory gets compiled into a known name assembly called App_Code.dll, so it’s easy to fix this with:

 

    <httpHandlers>

       <add verb="*" path="*.wws"      

            type="Westwind.WebStore.PageRedirectorHTTPHandler,App_Code" />

     </httpHandlers>

 

Of course, I didn’t find this during development but on the live site which ended up taking down the site for an hour before I caught the errors. Web.Config errors are always nasty because they don’t fire errors into the application – IOW, they are not trappable and no error reporting occurs.

 

Simple solution once you know <g>…