“This content cannot be displayed in a frame” - SharePoint 2013 Deployment
質問
I have developed a SharePoint-Hosted app which opens a new modal dialog in a list. On SharePoint Online it works without problems, but if I deploy the app on a SharePoint 2013 On-Premise system I get this error when I open the modal dialog:
I have this code added to my .aspx-file:
<WebPartPages:AllowFraming runat="server" />
But it does not work.
Here is my CustomAction from Elements.xml:
<CustomAction Id="2c2b7036-4582-4238-8205-b348628c0ed9.OpenMediaDatabase"
RegistrationType="List"
RegistrationId="100"
Location="CommandUI.Ribbon"
Sequence="10001"
HostWebDialog="true"
HostWebDialogHeight="900"
HostWebDialogWidth="800"
Title="Custom Title">
解決
Did you add in Elements.xml
inside CustomAction
this?
HostWebDialog="TRUE"
HostWebDialogWidth="500"
HostWebDialogHeight="500"
EDIT
If you are using Cross Site Publishing try adding <WebPartPages:AllowFraming runat="server"/>
inside master page like in this link
他のヒント
I added the <WebPartPages:AllowFraming runat="server"/>
inside the ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea"
in Default.aspx
page and the issue got resolved