Preview Page 404 When overridding ApplicationEventHandler
I am running Umbraco 7.6.4 and I have been trying to use the preview system to check content changes on different pages, on every page when I click the preview button I am shown a 404 page The URL contains the following
/umbraco/preview/?id=1066
Looking on the machine the App_Data\Preview Folder is empty which I believe needs cache files for preview to work.
After much testing I have established that I can get the preview to work if I comment out my RegisterEvents class that inherits from ApplicationEventHandler
The code is as follows
public class RegisterEvents : ApplicationEventHandler
{
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication,ApplicationContext applicationContext)
{
base.ApplicationStarting(umbracoApplication, applicationContext);
}
If I remove this class everything works correctly I have also tried using the Global.asax method but with the same issues I believe the above is the correct way to register events though.
Is this an issue with the Umbraco preview system or have I done some wrong in the above or missed out a setting any help would be a great help
Preview Page 404 When overridding ApplicationEventHandler
I am running Umbraco 7.6.4 and I have been trying to use the preview system to check content changes on different pages, on every page when I click the preview button I am shown a 404 page The URL contains the following
/umbraco/preview/?id=1066
Looking on the machine the App_Data\Preview Folder is empty which I believe needs cache files for preview to work.
After much testing I have established that I can get the preview to work if I comment out my RegisterEvents class that inherits from ApplicationEventHandler
The code is as follows
public class RegisterEvents : ApplicationEventHandler { protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication,ApplicationContext applicationContext) { base.ApplicationStarting(umbracoApplication, applicationContext); }
If I remove this class everything works correctly I have also tried using the Global.asax method but with the same issues I believe the above is the correct way to register events though.
Is this an issue with the Umbraco preview system or have I done some wrong in the above or missed out a setting any help would be a great help
If anyone has this kind of issues I manged to solve my issue. The RouteConfig I was running contained the following
routes.RouteExistingFiles = true;
I removed this and preview works.
is working on a reply...