症状
尝试在 iFrame 中打开 Appinv.aspx 页面时,页面未成功显示。 发生此问题时,请求响应标头包含"X-FRAME-OPTIONS: DENY"消息。
原因
为了帮助维护安全性,阻止 Appinv.aspx 页面显示在 iframe 中。
解决方法
若要解决此问题,请安装下列任一更新:
- SharePoint Server 2019 安全更新说明:2021 年 9 月 14 日 (KB5002018)
- SharePoint Enterprise Server 2016 安全更新说明:2021 年 9 月 14 日 (KB5002020)
- SharePoint Foundation 2013 安全更新说明:2021 年 9 月 14 日 (KB5002024)
若要在受信任域中的 iframe 中显示Appinv.aspx页,服务器场管理员可以通过运行以下命令,将受信任的域添加到场中的 AllowIframeAppAuthorizePageDomains 列表:
add-pssnapin *
$f=get-spfarm
$f.AddGenericAllowedListValue("AllowIframeAppAuthorizePageDomains","<enable domain name>")
$f.update()
注意
注意
每次都可以使用 命令将一个受信任的域添加到 AllowIframeAppAuthorizePageDomains 列表。 此外,还可以将通配符域(如*.contoso.com)添加到AllowIframeAppAuthorizePageDomains。
如果收到以下错误消息,请在调用
AddGenericAllowedListValue方法时使用AllowIframeAppAuthorizePageDomains2 代替 AllowIframeAppAuthorizePageDomains:“AllowIframeAppAuthorizePageDomains”已存在于名为 的父Microsoft.SharePoint.Administration.SPFarm 下...
此外,请确保已安装 Microsoft SharePoint 服务器 2022 年 3 月更新。
更改历史记录
下表汇总了本主题的一些最重要的更改。
| 日期 | 说明 |
|---|---|
| 2022 年 3 月 8 日 | 在“解决方案”部分添加了一条注释,以便在无法应用 AllowIframeAppAuthorizePageDomains 设置时提供修复。 |