共用方式為


The Visible property cannot be set on Web Part

I recently had a customer experiencing an issue with editing Web parts on a SharePoint 2013 page. The typical dropdown menu used to edit and delete the Web part was missing and replaced by a double arrow used for minimizing (collapsing) the Web part. It felt like a user permission issue, so we went through the permissions for the user logged into the browser, but ultimately didn't see any issue with the user's permission. Also while trying to edit the page that contained the Web parts, we would get an error with a Correlation ID. Looking at the ULS logs, we noticed this error:

The Visible property cannot be set on Web Part 'g_e9a9fae6_096a_4133_ae61_75e63a6a9b23'. It can only be set on a standalone Web Part.

Stack Trace:
[InvalidOperationException: The Visible property cannot be set on Web Part 'g_e9a9fae6_096a_4133_ae61_75e63a6a9b23. It can only be set on a standalone Web Part.]
   System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +2706778
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Control.PreRenderRecursiveInternal() +222
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

This particular Web part was an OOTB Documents Web part, so we could rule out any custom development issues. We ultimately decided to assume the permissions for the application pool account for this particular Web application was corrupt in some way. Our solution was to temporarily change the service account to a different managed account and then change it back so that SharePoint will reapply the necessary permissions.

The fix in our case:

From Central Administration:

  1. click Security and then Configure service accounts.
  2. Select the application pool from the list of application pools.
  3. Select a different managed account from the one listed.
  4. Click OK.
  5. Repeat steps 1-4 selecting the appropriate managed account this time around.