I stumbled upon yet another reason for EPiServer‘s edit mode to stop working properly the other day. It is rather stupid really, but unless you know about it, it may take a while to find.
Symptoms are as in the image above; left and right panes working, as well as the top menu. However, the page preview doesn’t show up, and the All Properties button doesn’t work. If surfing to the website’s view of the page, we get a 403.14 Forbidden HTTP Error message.
Global.asax.cs base class for EPiServer websites
The reason is quite simple. The EPiServer website was installed through code via the Nuget packages in an Asp.Net Visual Studio solution. Hence, the Global.asax.cs looked like below.
Global.asax.cs
public class MvcApplication : System.Web.HttpApplication { protected void Application_Start() { AreaRegistration.RegisterAllAreas(); RouteConfig.RegisterRoutes(RouteTable.Routes); } }
After updating the class to use EPiServer.Global instead of System.Web.HttpApplication the website had access to all of EPiServer’s features.
Global.asax.cs
public class MvcApplication : EPiServer.Global {
For other reasons why things are not working in EPiServer’s edit mode, please see article EPiServer edit mode dojo not working after switching to Visual Studio 2015 or EPiServer Content Folders ‘For All Sites’, ‘For This Site’, ‘For this Page’ not showing up in edit mode.
what about creating new empty epi site via VS extensions? :)
Yup, that’s a better way to do it :)