Try our conversational search powered by Generative AI!

404 Error while accessing episerver edit mode in EpiServer 7.5

Vote:
 

Hello all,

I'm creating a new topic similiar to the one below,

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2017/4/episerver-7-5-intermittent-404-error-while-accessing-edit-mode/

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.

 

#186947
Jan 09, 2018 11:53
Vote:
 

Are you using a shared database that is used by multiple developers?

#186961
Jan 09, 2018 13:57
Vote:
 

Hi Daniel,

Thanks for the reply. I'm not using shared database. I'm the only person working using this db. 

#186966
Jan 09, 2018 14:26
Vote:
 

Ok so not that one then. Built any caching on menus etc?

#186968
Jan 09, 2018 15:08
Vote:
 

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,

episerver.config

<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" />
 

#186969
Jan 09, 2018 15:16
Vote:
 

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

https://world.episerver.com/support/Bug-list/bug/121548

#186970
Jan 09, 2018 15:57
Vote:
 

Hi Daniel,

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 [13] DEBUG SearchSettings: Start dequeue unprocessed items
2018-01-10 09:49:28,533 [13] DEBUG SearchSettings: End dequeue unprocessed items
2018-01-10 09:49:29,473 [8] DEBUG EPiServer.Shell.Web.Routing.ModuleRouteCollection: Not routing '~/episerver/cms/' since it doesn't start with '~/modules'
2018-01-10 09:49:29,476 [8] 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 setting
2018-01-10 09:49:29,477 [8] 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 setting
2018-01-10 09:49:29,477 [8] DEBUG EPiServer.Shell.Web.Routing.ModuleRouteCollection: Not routing '~/episerver/cms/' since it doesn't start with '~/modules'
2018-01-10 09:49:29,644 [11] 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 [7] 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 [5] 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 [12] 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 [14] 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.

#187011
Edited, Jan 10, 2018 10:10
Vote:
 
<p>When you get the 404 in edit mode does the start page of the site still give a 200? Just wondering if the 404 thrown before the sites routing.</p>
#187103
Jan 11, 2018 18:19
Vote:
 

Hi Sebastian,

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)

#187113
Jan 12, 2018 7:03
Vote:
 

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;
}
#187120
Jan 12, 2018 10:04
Vote:
 

Hi Sebastian,

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.

#187121
Jan 12, 2018 10:32
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.