Monday, July 12, 2010

Attempted to use an object that has ceased to exist

Error : Attempted to use an object that has ceased to exist. (Exception from HRESULT: 0x80030102 (STG_E_REVERTED))

This error occurs when you are using the SPContext.Current.Web object and then trying to dispose it.

So, do not dispose of this object or other controls on your page will no longer be able to use it. Thus the error, attempted to use an object that has ceased to exist.

SharePoint will automatically dispose of the SPContext.Current.Web object once your page has completely loaded.

3 comments:

  1. In case anyone gets this issue after an upgrade to 2010: I got it on my site home-page and thought it was related to some orphaned object errors I had in the upgrade log, but this wasn't the case.

    I opened the Page in Web Part Maintenance Mode (?contents=1) and closed an XsltListViewWebPart that was causing the problem. This fixed the issue.

    ReplyDelete
  2. Excellent Peter .. that's the resolution

    ReplyDelete
  3. Thanks.. That worked so smooth..

    ReplyDelete