Asp.net ';X-Frame-Options';至';SAMEORIGIN';谷歌地图MVC

Asp.net ';X-Frame-Options';至';SAMEORIGIN';谷歌地图MVC,asp.net,asp.net-mvc,asp.net-mvc-3,google-maps,Asp.net,Asp.net Mvc,Asp.net Mvc 3,Google Maps,我想使用iframe显示带有以下代码的谷歌地图 <script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js"> <noscript> <div style="display: inline;"> <img height="1" width="1" style="border-style: none;" alt=""

我想使用iframe显示带有以下代码的谷歌地图

<script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js">
<noscript>
    <div style="display: inline;">
      <img height="1" width="1" style="border-style: none;" alt="" src="https://www.googleadservices.com/pagead/conversion/''/?label='';guid=ON&amp;script=0" />
    </div>
</noscript>
    <div class="mapContainer" style="width: 251px; height: 202px;">
       <iframe id="iGmap" width="251" height="202" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="@Html.Raw(Model.CurrentBranch.GoogleMapURLWithZoomSet)">
       </iframe>
    </div>
上面的代码是我在cshtml页面中使用的
但是,由于将“X-frame-Options”设置为“SAMEORIGIN”,因此给出了拒绝在帧中显示“…&ll=,&spn=,&output=embed&z=6”这样的错误,我遇到了相同的问题,并通过将此
AntiForgeryConfig.suppressxframeoptionheader=true
添加到我的Global.asax中的
受保护的无效应用程序启动()


这应该可以解决问题

我遇到了同样的问题,并通过将此
AntiForgeryConfig.suppressxframeoptionheader=true
添加到我的Global.asax中的
受保护的无效应用程序启动()方法来解决它

这应该可以解决问题

src='http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;msa=0&amp;msid=''&amp;ll='',''&amp;spn='',''&amp;output=embed&amp;z=4'