Why does using a code-behind for the global.asax break the Default Document in Edit Mode?


Clicking on pages in Edit Mode in my CMS 6 install suddenly started throwing 404s.  It didn't pick up the Default Document anymore.  Calls to this --


-- would 404, while calls to this (with the "default.aspx") --


-- would be fine.

I searched World and found this issue:

IIS7 Default Document 404

This guy had the same problem, but he fixed it by putting an empty global.asax in his root.

Then I remembered that I had made a change to the global.asax.  Before, it was standalone, with embedded SCRIPT tags.  I changed it to a code-behind, so I have a global.asax and a global.asax.cs.  I took all the namespaces in "@Import" directives and changed them to "using" statements at the top of the code-behind.  My global.asax now has nothing but an "@Application" directive at the top (like the example in the post linked above, but with an "inherits" attribute as well, pointing to the code-behind).

All the other stuff in the global file works fine.  Except this has somehow broken the Default Document in Edit Mode.

Why would this be?

Jul 08, 2010 18:42

Question: Does you Global class inherit from EPiServer.Global or System.Web.HttpApplication?

Jul 09, 2010 3:53


I changed it to EPiServer.Global and it works fine now.  Thanks so much.

Edited, Jul 09, 2010 15:28

No worries, happy to help!

Jul 10, 2010 5:44
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.