CalendarService.ashx (KB5064829) 的叠加设置中出现“EWS URL <无效:url>”错误

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

症状

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

注意

“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")