[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3413
  • Last Modified:

SharePoint Publishing Error: Attempted to use an object that has ceased to exist.

I created a Web Part.  It builds fine and does deploy to the SharePoint Web Site fine.  However, when I try to add the Web Part to the SharePoint Site, I get this error:  "Attempted to use an object that has ceased to exist."

How do I fix this error?

Thanks,

Dan
0
danielolorenz
Asked:
danielolorenz
  • 5
  • 3
4 Solutions
 
abhitrigCommented:
Can you put the stack trace?
Also check:
-If your solution is installing any other component (say a list) that's failing to get installed.
-You are not disposing the SPContext.Current.Web in your webpart code.
0
 
danielolorenzAuthor Commented:
Here is the stack trace:

Stack Trace:

[COMException (0x80030102): Attempted to use an object that has ceased to exist. (Exception from HRESULT: 0x80030102 (STG_E_REVERTED))]
   Microsoft.SharePoint.Library.SPRequestInternalClass.GetEffectiveRightsForCurrentUser(String bstrWebUrl, Object varRawAcl, UInt64 lAnonymousMask) +0
   Microsoft.SharePoint.Library.SPRequest.GetEffectiveRightsForCurrentUser(String bstrWebUrl, Object varRawAcl, UInt64 lAnonymousMask) +142

[SPException: Attempted to use an object that has ceased to exist. (Exception from HRESULT: 0x80030102 (STG_E_REVERTED))]
   Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) +27257906
   Microsoft.SharePoint.Library.SPRequest.GetEffectiveRightsForCurrentUser(String bstrWebUrl, Object varRawAcl, UInt64 lAnonymousMask) +229
   Microsoft.SharePoint.SPSite.GetEffectiveRightsForAcl(SPReusableAcl acl, SPWeb web) +86
   Microsoft.SharePoint.Publishing.AclCache.GetEffectivePermissions(Guid scopeId, SPWeb contextWeb) +206
   Microsoft.SharePoint.Publishing.WebControls.CombinedBasePermissions..ctor() +478
   Microsoft.SharePoint.Publishing.WebControls.ConsoleNode.CurrentPermissions() +151
   Microsoft.SharePoint.Publishing.WebControls.ConsoleNode.CurrentState(Page currentPage, Boolean cacheResult) +277
   Microsoft.SharePoint.Publishing.WebControls.EditingMenuActions.ConsoleAction.OnPreRender(EventArgs e) +122
   System.Web.UI.Control.PreRenderRecursiveInternal() +108
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Control.PreRenderRecursiveInternal() +224
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394

 

0
 
abhitrigCommented:
Thanks...Did you check for these?
-If your solution is installing any other component (say a list) that's failing to get installed.
-You are not disposing the SPContext.Current.Web in your webpart code.

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
danielolorenzAuthor Commented:
Yes, I did check for those things.  Everything else on my SharePoint project looks good.
0
 
abhitrigCommented:
Would it be possible to upload your webpart code? Also, can you try putting the webpart on a blank webpart page to rule out any other webparts on the page causing any issues?
0
 
danielolorenzAuthor Commented:
I got the Web Part published.  I web to my own web site where I have exclusive permissions and I got it to publish fine.

Thanks,

Dan
0
 
danielolorenzAuthor Commented:
Should close
0
 
danielolorenzAuthor Commented:
Really nice advice to aid in the SharePoint problem solving aspects.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now