I'm creating a new topic similiar to the one below,
We've build the EpiServer CMS tool using the Alloytech templates in our existing MVC application. After login the edit works fine and I'm able to publish as well.
But after a while I'll be getting 404 error when I try to access the same edit mode. The only fix I've now is to restart the application pool.
Can anyone please help me to sort this out?
The above shared thread is not yet resolved. It is still open.
Are you using a shared database that is used by multiple developers?
Thanks for the reply. I'm not using shared database. I'm the only person working using this db.
Ok so not that one then. Built any caching on menus etc?
No Daniel we don't have any caching for the menus. Config settings are same as you see in the Alloytech template.
Below are the config settings,
<applicationSettings httpCacheability="Public" pageValidateTemplate="false" uiShowGlobalizationUserInterface="true" urlRebaseKind="ToRootRelative"
uiUrl="~/EPiServer/CMS/CMS/" utilUrl="~/util/" uiEditorCssPaths="~/Static/css/app.css" uiSafeHtmlTags="b,i,u,br,em,strong,p,a,img,ol,ul,li" />
Last shot in the dark. Check that the url for the site is correct in admin. If that is not correct you will get 404s in some cases from edit mode.
You have any other information on what exactly is throwing that 404?
You can turn on log4net on info level and see if that gives anymore clues.
Might be this bug too
Thanks for your time.
I checked the URL for the site in admin and it looks fine. I get 404 only after sometime.
For example, Lets say I've kept the application in idle mode for sometime and later when I type in "https://test.com/episerver/cms" it will give me 404. This gets resolved after refreshing the application pool in IIS.
Sadly, the bug shared by you is a different issue.
I turned on the log4net on ALL level and I could see the below message,
2018-01-10 09:49:28,532  DEBUG SearchSettings: Start dequeue unprocessed items2018-01-10 09:49:28,533  DEBUG SearchSettings: End dequeue unprocessed items2018-01-10 09:49:29,473  DEBUG EPiServer.Shell.Web.Routing.ModuleRouteCollection: Not routing '~/episerver/cms/' since it doesn't start with '~/modules'2018-01-10 09:49:29,476  INFO EPiServer.Web.Routing.Segments.LanguageSegment: There was no language segment found for url 'episerver/cms/' and no language host mapping found therefore routing is stopped due to strict routing setting2018-01-10 09:49:29,477  INFO EPiServer.Web.Routing.Segments.LanguageSegment: There was no language segment found for url 'episerver/cms/' and no language host mapping found therefore routing is stopped due to strict routing setting2018-01-10 09:49:29,477  DEBUG EPiServer.Shell.Web.Routing.ModuleRouteCollection: Not routing '~/episerver/cms/' since it doesn't start with '~/modules'2018-01-10 09:49:29,644  DEBUG EPiServer.Shell.Web.Routing.ModuleRouteCollection: Not routing '~/lib/tooltipster/tooltipster.css' since it doesn't start with '~/modules'2018-01-10 09:49:29,644  DEBUG EPiServer.Shell.Web.Routing.ModuleRouteCollection: Not routing '~/lib/cookieconsent/cookieconsent.min.css' since it doesn't start with '~/modules'2018-01-10 09:49:29,646  DEBUG EPiServer.Shell.Web.Routing.ModuleRouteCollection: Not routing '~/css/styles.css' since it doesn't start with '~/modules'2018-01-10 09:49:29,646  DEBUG EPiServer.Shell.Web.Routing.ModuleRouteCollection: Not routing '~/lib/colorbox/colorbox.css' since it doesn't start with '~/modules'2018-01-10 09:49:29,646  DEBUG EPiServer.Shell.Web.Routing.ModuleRouteCollection: Not routing '~/lib/modernizr/modernizr.custom.js' since it doesn't start with '~/modules'
I tried changing the url from "/episerver/cms" to "/modules/cms", this will give me only Admin related pages but on click of edit I'll be getting a blank page.
I'm still looking into the error log. Hopefully I can find something there.
I'm getting 404 error as soon as I navigate to my episerver edit mode. For example, "https://test.com/episerver/cms".
Which means I'm getting 404 before sites routing.
I see the below exception in Event Viewer,
Exception information: Exception type: HttpException Exception message: Session state has created a session id, but cannot save it because the response was already flushed by the application. at System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext context, String id, Boolean& redirected, Boolean& cookieAdded) at System.Web.SessionState.SessionStateModule.CreateSessionId() at System.Web.SessionState.SessionStateModule.DelayedGetSessionId() at System.Web.SessionState.SessionStateModule.ReleaseStateGetSessionID() at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I'm not sure that is related to the problem but it's worth trying. I remember seeing those errors before and I think we solved it by setting in global.asax:
void Session_Start(object sender, EventArgs e)
// Code that runs when a new session is started
string sessionId = Session.SessionID;
I had already tried the above mentioned code in global.asax but unfortunately the issue still exists. The code in global.asax will execute when I launch the application, i.e when I give the URL as "https://www.test.com" but the methods in global.asax won't execute when I type "https://www.test.com/episerver/cms". This is where I get 404 error.