"The Content Cannot Be Displayed In A Frame" Message When Using an Alternate Access Mapping URL RRS feed

  • Question

  • Dear All,

    At my client's site, we have the original URL and we've created an Alternate Access Mapping URL (a user-friendly one). The problem is when we tried to open a form to add a new item (in a dialog box), an error message showed up in the dialog box saying "The Content Cannot Be Displayed In A Frame".

    I have read some blogs suggesting that I should add this tag "<WebPartPages:AllowFraming runat="server" /> " in the master page (seattle.master). I added it, the form appeared correctly and the message has gone; but it's not working properly (e.g. the "cancel" button is not functioning; I click it and nothing happens).

    Note: The issue is happening ONLY when using the user-friendly URL. When using the original one, the form works well.

    If you could please help me with this, I would be very thankful!

    Monday, July 10, 2017 8:59 AM


  • Problem Solved!

    In the javascript I have noticed that we typed the WHOLE URL (the original one) in both "onclick=..." and "window.location.href=...".

    so to solve the issue; I just had to modify the URL to start with the subsite...


    "http:// spOriginalUrl-app/subsite1/subsite2/form.aspx" - instead of typing all of that, we just need to type "/subsite1/subsite2/form.aspx".

    That's why it worked like a charm when I accessed it through the original URL, and the opposite happened when I accessed it through the alternative one (the user-friendly URL).

    Wednesday, July 12, 2017 8:39 AM