November Happy Hour will be moved to Thursday December 5th.

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

Vote:
 

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 --

http://mysite/admin/CMS/edit/?id=210

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

http://mysite/admin/CMS/edit/default.aspx?id=210

-- would be fine.

I searched World and found this issue:

IIS7 Default Document 404
http://world.episerver.com/Templates/Forum/Pages/thread.aspx?id=34791

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?

#41508
Jul 08, 2010 18:42
Vote:
 

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

#41512
Jul 09, 2010 3:53
Vote:
 

System.Web.HttpApplication

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

#41529
Edited, Jul 09, 2010 15:28
Vote:
 

No worries, happy to help!

#41542
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.