Default document breaks in edit mode in EPiServer CMS 5

This article was migrated from an older iteration of our website, and it could deviate in design and functionality.

This post explains how to get around a problem in EPiServer 5 which causes the edit mode link to throw a 404, page not found.

Estimated read time : 1 minutes

Jump to

Problem description

Whenever we click Admin mode we successfully get the admin mode at http://mysite/secure/admin/default.aspx

Whenever we click Edit mode we get a 404 because there’s no default document (ie default.aspx): http://mysite/secure/edit/

Screenshot 404 for edit mode in EPiServer

Note: the default document setting in IIS was properly set.

How to resolve it

  1. If you do not have a global.asax file in your project, go ahead and add it.
  2. Next, make sure it inherits EPiServer.Global (this is key)

Now the links to switch between admin and edit mode in EPiServer work again:

Screenshot of EPiServer edit and admin link