CalendarService.ashx 中的覆盖设置中的“EWS URL 无效:”错误 (KB5064829)

应用对象
SharePoint Server Subscription Edition SharePoint Server 2019 SharePoint Server 2016

症状

在“Calendar覆盖设置”中配置 Exchange Web 服务 URL 参数后,CalendarService.ashx 文件会显示“无效的 EWS URL: <url>”错误条目。 发生此问题时,以下错误条目和“583ga”或“apmev”事件标记将记录在 SharePoint 统一日志记录系统 (ULS) 日志中:

注意

“ExchangeAccess:阻止无效调用。 ServiceURL='{0}'.“,

原因

默认情况下,为了帮助维护安全性,SharePoint 服务器 中不允许使用 Exchange Web 服务 URL。

解决方法

注意

在按照这些说明取消阻止之前,请确保阻止的 URL 是安全的。

若要解决此问题,服务器场管理员可以运行以下 PowerShell 命令,将阻止的 URL 添加到 AllowedSafeDomain

add-pssnapin * 
$f=get-spfarm 
$f.AllowedSafeDomain.Add("<host>") 
$f.update() 

例如:

$f.AllowedSafeDomain.Add("smtp.office365.com")