Upgrades Questions on upgrading to version 7.x.
Version 7.x > Upgrades > Session state error after upgrade View modes: 
User avatar
Member
Member
marty.nord-deaconess - 12/17/2012 3:42:00 PM
   
Session state error after upgrade
After upgrading from 5.5R2 to 7.0, we are receiving error notification emails that contain the following:
Source: Application_Error

EventCode: EXCEPTION

UserID: 65

UserName: public

EventDescription: Message: Session state has created a session id, but cannot save it because the response was already flushed by the application.

EventUrl: /CMSPages/GetFile.aspx?guid=5569875e-ecd8-4beb-806c-f309e1a67541

Stack Trace:
at System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext context, String id, Boolean& redirected, Boolean& cookieAdded)
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.SessionState.SessionStateModule.OnEndRequest(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

UserID: 65 is the public anonymous user account. The guid is a PDF in our system.

We were not receiving these emails while running under 5.5R2. We have asked Support about this issue but wanted to see if anyone else has run into this issue.

We have only made a small portion of the Intranet Portal live. Current users of our site do not receive any error messages. We did not know our site had an issue until we started receiving the error notification emails.

Has anyone else had this issue? If so, how did you fix it?

Thanks...

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 12/20/2012 5:56:39 AM
   
RE:Session state error after upgrade
Hi Marty,

What I am thinking about.. do you have this issue in every browser or just in a specific one?

Best regards,
Martin Danko

User avatar
Member
Member
marty.nord-deaconess - 12/27/2012 8:59:02 AM
   
RE:Session state error after upgrade
We have determined the problem and are still working on a solution.

When one of our content authors adds a new document to the intranet site, she puts together an email message which she sends to all employees which contains a link to the PDF file in Kentico. The employees click the link from the email message which opens a browser window. Note: The employee is not authenticated into Kentico when they click the link.

As a result, the PDF file will display in the browser but it also causes the session id error to be generated.

If the link is formatted this way, it causes an error:
http://<site name>/CMSPages/GetFile.aspx?guid=7520f8b6-1f49-492a-98a0-8690b1638c2d

If the link is formatted with the additional versionhistoryid and chset parameters, it does not generate a session id error:
http://<site name>/CMSPages/GetFile.aspx?guid=7520f8b6-1f49-492a-98a0-8690b1638c2d&versionhistoryid=1409&chset=26adb727-8630-49b6-b9e0-1137c41e5d59

Under CMS Desk, we found the second link by hovering over a PDF file. We noticed that it contained the extra parameters. We just happened to copy it to our clipboard and then paste it in a new browser window. We logged out of Kentico and closed all other browser windows before trying the link. It did not generate an error.

We have asked Support about it and they are not able to reproduce the error. Support has suggested that we apply the hotfix 7.0.13 as we are still running 7.0.12. An error with getfile.aspx is supposed to be addressed in 7.0.13.

We will probably apply hotfix 7.0.13 but we are looking to add the versionhistoryid and chset parameters to our transformation that generates the links that the content author is added to her email. We are still looking in the documentation on how to retrieve the values for these parameters.

Thanks...

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 1/2/2013 4:22:27 AM
   
RE:Session state error after upgrade
Hi Marty,

Juraj was already solving this issue with your colleague - Skip....
Anyway, the versionh history ID is the ID of the version of given object/document - you can use the VersionManager class to work with versions.

The chset parameter is a newly generated GUID.

So the chset shouldn't have any impact, just the version history ID... you are able to get the full version history and then select the last version from the CMS_VersionHistory table.

Anyway, I would recommend you to apply the latest hotfix as first.

Best regards,
Martin Danko

User avatar
Certified Developer v6
Certified Developer v6
Nortech - 9/9/2013 9:16:23 AM
   
RE:Session state error after upgrade
We have the same problem caused by urls that initiate a file download (e.g.<website url>/getattachment/b35167ad-2500-4af1-99fd-08bdf4e3abbb/aeroplana-planes?width=700)

Is this a recomended solultion http://stackoverflow.com/questions/904952/whats-causing-session-state-has-created-a-session-id-but-cannot-save-it-becau?

I' using kentico CMS 7.0.47

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 9/12/2013 8:25:36 AM
   
RE:Session state error after upgrade
Hello,

Could you please post here a full stack trace of your error message?
Most probably it is caused by search engines robots accessing documents (attachments) stored in the site and canceling the download immediately. And yes, you can try to apply that article as a workaround.

Best regards,
Martin Danko

User avatar
Certified Developer v6
Certified Developer v6
Nortech - 9/13/2013 1:41:32 AM
   
RE:Session state error after upgrade
Hi Martin,

Here is the error message:
EventCode: EXCEPTION

UserID: 65

UserName: public

IPAddress: 174.129.237.157

EventDescription: Message: Session state has created a session id, but cannot save it because the response was already flushed by the application.
Stack Trace:
at System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext context, String id, Boolean& redirected, Boolean& cookieAdded)
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.SessionState.SessionStateModule.OnEndRequest(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


Site: XXX XXXXXX

EventUrl: /getattachment/0e0944c4-3149-437a-bbff-f230ff03e504/ELYSIUM

EventMachineName: XXXX

EventUserAgent: ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com)

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 9/26/2013 9:22:28 AM
   
RE:Session state error after upgrade
Hello,

Could you please tell me if this instance is running on your own server or are you using Amazon, CDN, etc.?

Best regards,
Martin Danko

User avatar
Certified Developer v6
Certified Developer v6
Nortech - 9/26/2013 10:37:42 AM
   
RE:Session state error after upgrade
Hello Martin,

It is running on a dedicated server located in US.

Best regards,

Ulysses.