title: Load denied by X-Frame-Options: "http://test.test.net/Feedback/Create?appId=TestApp" does not permit cross-origin framing using MVC5
body: <p>I'm working on a website that's hosted on my company network and only accessible from within the network, so I have no concern with cross-domain requests.  </p>
  
  <p>Anyways, this particular website I'm working on I added a "Provide Feedback" link in the navigation bar.  This "Provide Feedback" link opens a jQuery modal dialog, and inside this dialog is an <code>iframe</code> that loads from an URL whose server is different than the one this particular website is hosted on, hence the error I'm getting.</p>
  
  <p>MVC4 worked fine, no problems like this, it's only when I upgraded to MVC5.  There's something different about MVC5 that prevents content from being loaded into a frame.</p>
  
  <p>I've read about setting the X-Frame options to "ALLOWFROM" - but does this mean I need to set this on the app URL loaded in the <code>iframe</code>, or the calling application (the website that has this link in the nav bar)?  I'll also add that this problem only showed up when I upgraded the application that's supposed to be loading in the <code>iframe</code> from MVC4/WebAPI to MVC5/WebAPI version 2.  I had no issues with this using the previous version of MVC.  How can I resolve this issue?</p>
  
  <p><img src="https://i.stack.imgur.com/89NMb.jpg" alt="enter image description here"></p>
  
  <p>Larger version of Firebug:
  <img src="https://i.stack.imgur.com/FqF0N.jpg" alt="enter image description here"></p>
  
  <p>Here's my client-side code in the app that contains the code for "Provide Feedback":</p>
  
  <pre><code>$(document).ready(function () {
              $('body').append("&lt;div id='dialog-modal'&gt;&lt;iframe width='900' height='420' src='http://blah.blah.net/ApplicationName/AppFeedback/Create?appId=TestApp'&gt;&lt;/iframe&gt;&lt;/div&gt;");
              $("#dialog-modal").dialog({
                  buttons: {
                      "Close": function () {
                          $(this).dialog("close");
                      }
                  },
                  title: "Provide Feedback!",
                  autoOpen: false,
                  height: 560,
                  width: 940,
                  modal: true,
                  overlay: {
                      backgroundColor: "#000000",
                      opacity: 0.75
                  },
                  resizable: true,
                  open: function () {
                      $('.ui-widget-overlay').bind('click', function () {
                          $('#dialog-modal').dialog('close');
                      })
                  }
              });
  
              $("a.feedback").live("click", function (event) {
                  event.preventDefault();
                  $("#dialog-modal").dialog("open");
              });
  </code></pre>