Hi!
I'm tying to install our plugin to ensure the functionallity. I have downloaded and installed the latest Foundation version and that works just fine.
I have installed our plugin and the site works is running but when entering the backoffice I get an exception. Neither edit or admin will not load.
The exception is:
Exception information:
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
at EPiServer.Insight.UI.ProfilesRolesRepository.GetRolesForUser(String userName)
at EPiServer.Insight.UI.ProfilesMenuProvider.AddProfilesMenuItems(ICollection`1 menuItems)
at EPiServer.Insight.UI.ProfilesMenuProvider.GetMenuItems()
at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
at EPiServer.Shell.Navigation.MenuAssembler.GetMenuItems(String parentPath, Int32 relativeDepth)
at EPiServer.Shell.Navigation.MenuAssembler.GetMenuHierarchy(String rootPath, Int32 relativeDepth, String selectionPath)
at EPiServer.Shell.Web.Internal.NavigationService.GetCurrentProduct()
at EPiServer.Shell.Web.Internal.NavigationService.GetCurrentProductId()
at EPiServer.Shell.Navigation.MenuHelper.CreateMenuRootElement()
at EPiServer.Shell.Navigation.MenuHelper.CreatePlatformNavigationMenu()
at EPiServer.Shell.Web.UI.WebControls.PlatformNavigationMenu.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
at ASP.episerver_cms_masterpages_frameworks_framework_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in http://server/episerver/CMS/MasterPages/Frameworks/Framework.Master:line 8
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
I have managed to find out that there is one line of code causing this and that it is this line:
RouteTable.Routes.MapMvcAttributeRoutes();
Our plugin is using routing attributes so we need to map these on startup.
Removing that line of code, backoffice works just fine, my menu items are loading correctly but routing does not work of course.
Uninstallning EPiServer.Insight and every thing works just fine.
Does anyone have a clue why MapMvcAttributeRoutes does not work with EPiServer.Insight?
Thanks!
/Kristoffer