SharePoint: Cannot add Web Parts to this Web Part Page. Either there are no zones on this page or you do not have permissions to add Web Parts.

I needed to make changes in the webpart present on a custom webpart page which was deployed using one of our solutions. I tried to edit the page by clicking on Edit link (the page can also be edited by appending ?toolpaneview=2 to the url). I got the following error message:
Cannot add Web Parts to this Web Part Page. Either there are no zones on this page or you do not have permissions to add Web Parts.
I was logged in as an administrator and the page surely had the webpart zone. I opened the the custom page of the solution in Visual studio and noticed that the property AllowCustomization was set to false as shown:
<WebPartPages:WebPartZone id="ContentZone" runat="server" title="Content Zone" Orientation="Vertical" AllowCustomization="false" FrameType="Standard"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>

I set AllowCustomization to true and deployed the solution and was able to edit the webpart.
profile for Nadeem Yousuf at SharePoint Stack Exchange, Q&A for SharePoint enthusiasts

+