This error happens on every page of the site.
- I click on link to open page like http://myportal.com/Lists/List1/
- SharePoint open it and in url add smth like AllItems.aspx, so it url looks like http://myportal.com/Lists/List1/AllItems.aspx
- After passing some time (3-4 minutes) I refresh this page and this error appears.
This error appears also if I stay for 3-5 minutes on one page and then click on link like http://myportal.com/SitePages/Page1.aspx to go to another.
I have done almost everything that I could find in the net:
- change the value of MaxHttpCollectionKeys
- restart services of Timer,Asp.Net state,User Profile,Search
- start sharepoint configuration wizard.
in monitoring in CA I have error only for indexing schedule manager.
I don't think that it depends on my code, because it happens everywhere on my portal. May be some SPWeb or SPSite object automatically disposing every 3-5 minutes, may be there are some utilities to check this.
Please, help me, I'm trying to decide this problem during 2 weeks, and no results..
Operation is not valid due to the current state of the object. Exception Details: System.InvalidOperationException: Operation is not valid due to the current state of the object.
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: [InvalidOperationException: Operation is not valid due to the current state of the object.] Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web) +218 Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context) +520 Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.GetContextWeb(HttpContext context) +27 Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PostResolveRequestCacheHandler(Object oSender, EventArgs ea) +918 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171`
Thanks!
UPD: From log:
08/02/2013 09:33:55.35 w3wp.exe (0x1588) 0x1BE0 SharePoint Foundation Logging Correlation Data xmnv Medium Name=Request (GET:http://page.aspx) cccee8b6-0eac-4a4b-ae68-cce0c71a2646
08/02/2013 09:33:55.36 w3wp.exe (0x1588) 0x1BE0 SharePoint Foundation Runtime tkau Unexpected System.InvalidOperationException: Operation is not valid due to the current state of the object. at Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web) at Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.GetContextWeb(HttpContext context) at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PostResolveRequestCacheHandler(Object oSender, EventArgs ea) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) cccee8b6-0eac-4a4b-ae68-cce0c71a2646
08/02/2013 09:33:55.38 w3wp.exe (0x1588) 0x1BE0 SharePoint Foundation Monitoring b4ly Medium Leaving Monitored Scope (Request (GET:http://page.aspx)). Время выполнения=26,7436 cccee8b6-0eac-4a4b-ae68-cce0c71a2646