Teams 日历请求导致 Exchange Server 2016 记录未处理的异常 (maxQueryStringLength)

Teams calendar requests causes Exchange Server 2016 to log unhandled exception (maxQueryStringLength)

Teams 日历请求导致 Exchange Server 2016 记录未处理的异常 (maxQueryStringLength)

我们的本地 Exchange Server 2016 正在记录未处理的异常 – 似乎是 Teams 通过 REST 查询日历数据API。

在事件日志中:(example.com 是我们的本地 Exchange 服务器)

Exception information: 
    Exception type: HttpException 
    Exception message: The length of the query string for this request exceeds the configured maxQueryStringLength value.
   at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()
   at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

Request information: 
    Request URL: https://example.com/api/v2.0/me/calendarView?$top=0&$select=attendees,body,categories,end,hasAttachments,iCalUId,id,isAllDay,isCancelled,isOrganizer,isReminderOn,location,locations,onlineMeetingUrl,organizer,originalEndTimeZone,originalStartTimeZone,reminderMinutesBeforeStart,responseRequested,responseStatus,sensitivity,seriesMasterId,showAs,start,subject,type&startDateTime=2020-03-25T20:46:37Z&endDateTime=2020-03-25T21:46:37Z&$expand=singleValueExtendedProperties($filter=PropertyId eq 'String {00020329-0000-0000-C000-000000000046} Name SkypeTeamsMeetingUrl' or PropertyId eq 'String {00020329-0000-0000-C000-000000000046} Name SkypeTeamsProperties' or PropertyId eq 'String {00020329-0000-0000-C000-000000000046} Name SchedulingServiceUpdateUrl' or PropertyId eq 'Integer {00062002-0000-0000-C000-000000000046} Id 0x8217' or PropertyId eq 'String {00020329-0000-0000-C000-000000000046} Name OnlineMeetingConferenceId' or PropertyId eq 'String {00020329-0000-0000-C000-000000000046} Name OnlineMeetingTollNumber' or PropertyId eq 'Binary {6ed8da90-450b-101b-98da-00aa003f1305} Id 0x0023' or PropertyId eq 'Boolean {00020329-0000-0000-C000-000000000046} Name DoNotForward' or PropertyId eq 'String {00020329-0000-0000-C000-000000000046} Name ClientOptimisticEventId' or PropertyId eq 'String {00020329-0000-0000-C000-000000000046} Name OnlineMeetingConfLink' or PropertyId eq 'String {00020329-0000-0000-C000-000000000046} Name TeamsVtcConferenceId' or PropertyId eq 'String {00020329-0000-0000-C000-000000000046} Name TeamsVtcTenantId' or PropertyId eq 'String {6ed8da90-450b-101b-98da-00aa003f1305} Name OnlineMeetingConferenceId' or PropertyId eq 'String {6ed8da90-450b-101b-98da-00aa003f1305} Name OnlineMeetingTollNumber'),multiValueExtendedProperties($filter=PropertyId eq 'StringArray {00020329-0000-0000-C000-000000000046} Name OnlineMeetingTollFreeNumbers' or PropertyId eq 'StringArray {6ed8da90-450b-101b-98da-00aa003f1305} Name OnlineMeetingTollFreeNumbers') 

编辑:"C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\rest\web.config"

添加

maxQueryStringLength="10240"

< httpRuntime />

例如 < httpRuntime maxRequestLength="2097151" maxUrlLength="2048" maxQueryStringLength="10240" requestPathInvalidCharacters="<,>,*,%,\,?" requestValidationMode="2.0" />

我的大小可能超出一英里(最大字符串约为 1956 字节),但这让我无休止地烦恼。

更新 web.config 文件中的 maxQueryStringLength。