6

I am facing this error all day long and I have not figured it out yet. I have tried:

  1. setting the date time zone in the web application to match that of the server
  2. set "security validation expires" to never
  3. performed after that an IISReset

But nothing worked.

Below you will see the stack trace. I am not sure how to solve this. Anyone any ideas?

The context has expired and can no longer be used. (Exception from HRESULT: 0x80090317) 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.COMException: The context has expired and can no longer be used. (Exception from HRESULT: 0x80090317)

Source Error: 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace: 

[COMException (0x80090317): The context has expired and can no longer be used. (Exception from HRESULT: 0x80090317)]
   Microsoft.SharePoint.Library.SPRequestInternalClass.SetHttpParameters(String bstrHttpMethod, String bstrRequestDigest, UInt32 flags, Guid gTranLockerId, Byte[]& ppsaImpersonateUserToken, Boolean bIgnoreTimeout, String bstrUserLogin, String bstrUserKey, UInt32 ulRoleCount, String bstrRoles, Boolean bWindowsMode, String bstrAppPrincipalName, Boolean bIsHostHeaderAppPrincipal, String bstrOriginalAppPrincipalIdentifier, ApplicationPrincipalInfo& pAppUserInfo, Boolean bInvalidateCachedConfigurationProperties, Int32 lAppDomainId, ISPManagedObjectFactory pFactory, Boolean bCallstack, ISPDataCallback pCanaryCallback) +0
   Microsoft.SharePoint.Library.SPRequest.SetHttpParameters(String bstrHttpMethod, String bstrRequestDigest, UInt32 flags, Guid gTranLockerId, Byte[]& ppsaImpersonateUserToken, Boolean bIgnoreTimeout, String bstrUserLogin, String bstrUserKey, UInt32 ulRoleCount, String bstrRoles, Boolean bWindowsMode, String bstrAppPrincipalName, Boolean bIsHostHeaderAppPrincipal, String bstrOriginalAppPrincipalIdentifier, ApplicationPrincipalInfo& pAppUserInfo, Boolean bInvalidateCachedConfigurationProperties, Int32 lAppDomainId, ISPManagedObjectFactory pFactory, Boolean bCallstack, ISPDataCallback pCanaryCallback) +508

[SPException: The context has expired and can no longer be used. (Exception from HRESULT: 0x80090317)]
   Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) +146
   Microsoft.SharePoint.Library.SPRequest.SetHttpParameters(String bstrHttpMethod, String bstrRequestDigest, UInt32 flags, Guid gTranLockerId, Byte[]& ppsaImpersonateUserToken, Boolean bIgnoreTimeout, String bstrUserLogin, String bstrUserKey, UInt32 ulRoleCount, String bstrRoles, Boolean bWindowsMode, String bstrAppPrincipalName, Boolean bIsHostHeaderAppPrincipal, String bstrOriginalAppPrincipalIdentifier, ApplicationPrincipalInfo& pAppUserInfo, Boolean bInvalidateCachedConfigurationProperties, Int32 lAppDomainId, ISPManagedObjectFactory pFactory, Boolean bCallstack, ISPDataCallback pCanaryCallback) +2110
   Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, SPAppPrincipalToken appPrincipalToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous) +3655
   Microsoft.SharePoint.SPSite.get_Request() +320
   Microsoft.SharePoint.SPSite.OpenWeb(Guid gWebId, Int32 mondoHint) +92
   Microsoft.SharePoint.Publishing.CachedArea.GetIdentityWeb(Guid webId, SPSite elevatedSite, Boolean isSuperUser) +393
   Microsoft.SharePoint.Publishing.CachedArea.GetChildListByUrl(String listurl) +222
   Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions.QuickDeployAction.IsCurrentlyEnabled(AuthoringStates currentState) +263
   Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions.ConsoleAction.PagePreRenderComplete(Object sender, EventArgs e) +124
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4428
4
  • Can you check and confirm your database size, free space might be running out of your application content database. Commented Aug 14, 2015 at 6:41
  • 1
    Try setting request management to stop as explained here: social.technet.microsoft.com/Forums/sharepoint/en-US/…
    – Akhoy
    Commented Aug 14, 2015 at 6:52
  • Did you ever manage to find a solution to this? We're struggling to fix exactly the same problem but haven't come close to a solution. We've tried everything so far, but the problem persists. We have about exactly the same stack trace as you do!
    – Daniel B
    Commented Aug 17, 2015 at 10:26
  • I have not found a solution yet, but I will let you know if I find one. At the moment I have turned off the security validation till I find the cause. Users are complaining, cause they can't use the site.
    – Imir Hoxha
    Commented Aug 17, 2015 at 11:56

3 Answers 3

8

Resetting the environment with an iisreset did the job.

1
  • 1
    This 'resolves' the issue for us also but it comes back after 2 days.
    – thekryten
    Commented Jul 31, 2018 at 22:00
3

Stop the Timer service. To do this, follow these steps:

  • Open Services
  • Right-click SharePoint 2010 Timer, and then click Stop.
  • Close the Services console.
  • In Windows Explorer, locate following folder: %SystemDrive%\ProgramData\Microsoft\SharePoint\Config\GUID
  • Find cache.in open in editor type 1 save and close the file.
  • Open Services
  • Start SharePoint 2010 Timer service
3

After I cleaned the cache the error below stopped:

Content deployment job 'Remote import job for job with sourceID = d70b63f3-89f5-42e2-8f5d-8457d29cdfe8': Import in progressThe exception thrown was 'Microsoft.SharePoint.SPException' : 'The context has expired and can no longer be used. (Exception from HRESULT: 0x80090317)'

Instructions: https://www.zubairalexander.com/blog/clearing-the-sharepoint-configuration-cache/

Scripts: https://github.com/DwayneSelsig/spcachecleaner

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.