on 4.11.x (including 4.11.5) and 6.0.0 this works. on 6.0.1 it throws the following error
[HttpException (0x80004005): Request is not available in this context]
System.Web.HttpContext.get_Request() +9718164
System.Web.HttpContextWrapper.get_Request() +28
umbraco.BusinessLogic.Cookies.get_HasCookies() +26
umbraco.BasePages.BasePage.get_umbracoUserContextID() +25
umbraco.BusinessLogic.User.GetCurrent() +8
umbraco.cms.businesslogic.media.MediaType.Save() +269
looking at the source the following lines have been added to MediaType.Save
var current = User.GetCurrent(); int userId = current == null ? 0 : current.Id; ApplicationContext.Current.Services.ContentTypeService.Save(_mediaType, userId);
It all works if i switch from using IApplicationEventHandler and go back to ApplicationBase.
given that IApplicationEventHandler is implimented diffrently in 4.11.x and 6.x shall i admit defeat and go back to the Deprecated ApplicationBase method ?
6.0.1 MediaType.Save fails if called at application startup
I have a package that reads in settings and saves them at application startup time. ( http://our.umbraco.org/projects/developer-tools/usync) it is hooked into IApplicationEventHandler OnStarted function.
One thing is does is loads and saves MediaTypes
on 4.11.x (including 4.11.5) and 6.0.0 this works. on 6.0.1 it throws the following error
looking at the source the following lines have been added to MediaType.Save
is this a bug ? or my stupid coding ?
It all works if i switch from using IApplicationEventHandler and go back to ApplicationBase.
given that IApplicationEventHandler is implimented diffrently in 4.11.x and 6.x shall i admit defeat and go back to the Deprecated ApplicationBase method ?
I''ve logged this as a bug, because it does happen on ApplicationBase also, http://issues.umbraco.org/issue/U4-1831
is working on a reply...