且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

拒绝在框架中显示“",因为它将"X-Frame-Options"设置为"SAMEORIGIN"

更新时间:2021-09-09 21:56:55

找到了解决方案:将其添加到global.asax.cs

found the solution: add this to global.asax.cs

  protected void Application_PreSendRequestHeaders()
    {
        Response.Headers.Remove("X-Frame-Options");
         Response.AddHeader("X-Frame-Options", "AllowAll");

    }