我有一个 ASP.NET 网站。
页面加载后,出现以下错误。
错误: X-Frame-Options 拒绝加载:http://www.youtube.com/v/lgZBsWGaQY0&feature不允许跨源框架。
由于此错误,YouTube 视频无法在 iframe 中打开。
<div style="display: none; position: relative;">
<div id="divYouTubeClasses">
<iframe id="Iframe1" style="background-color: White !important; border: 0;" width="835"
height="430" src="http://www.youtube.com/v/g5RM5StrMXY" scrolling="no"></iframe>
</div>
</div>
请提供此错误的一些解决方案。
最佳答案
查询中的原始 URL
http://www.youtube.com/v/lgZBsWGaQY0&feature
预期网址
http://www.youtube.com/embed/lgZBsWGaQY0?autoplay=1
关于asp.net - X-Frame-Options 拒绝加载 : http://www. youtube.com/v/g5RM5StrMXY 不允许跨源框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15272857/