Office 365日历REST API:“;对象引用未设置为对象的实例。”;

Office 365日历REST API:“;对象引用未设置为对象的实例。”;,api,rest,calendar,office365,Api,Rest,Calendar,Office365,几周来,我一直在与几个用户一起使用Office 365 Calendar REST api。 我目前正在经历一件非常奇怪的事情: 使用/calendarview调用(通过OAUTH2)获取特定用户的事件时。我得到了完美的结果(虽然速度很慢),但当25/01介于我的开始日期和结束日期之间时,我得到: {"error":{"code":"ErrorInternalServerError","message":"Object reference not set to an instance of an

几周来,我一直在与几个用户一起使用Office 365 Calendar REST api。 我目前正在经历一件非常奇怪的事情: 使用/calendarview调用(通过OAUTH2)获取特定用户的事件时。我得到了完美的结果(虽然速度很慢),但当25/01介于我的开始日期和结束日期之间时,我得到:

{"error":{"code":"ErrorInternalServerError","message":"Object
reference not set to an instance of an object."}}"
我怀疑是这个用户的事件导致了这种情况,但是API不应该出现bug吗

有线索吗

以下是检测日志:

GET /api/v1.0/me/calendars/AQMkAGVmMjlhY2E5LWE4MmMtNGFhAGMtYjY5OC0wNmRiMWYxZDJkM2UARgAAA4ZtZygzpnpGt-RyQ8uQQ80HAG6teJW1hzZBuLm47wZiBYIAAAIBBgAAAG6teJW1hzZBuLm47wZiBYIAAAIM4gAAAA==/calendarview?&startDateTime=2015-02-24T23:55:38Z&endDateTime=2015-02-25T23:55:38Z&$top=50&$skip=0

HTTP/1.1
Content-Type: application/json
Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
Accept: */*
User-Agent: Ruby, JulieDesk
Authorization: Bearer $REFRESHTOKEN$
Return-Client-Request-Id: true
Client-Request-Id: be203946-93b7-47f6-b402-edbd0ed49653
Host: outlook.office365.com

HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Server: Microsoft-IIS/8.0
request-id: 4a0fe2ba-a761-4526-bd09-70c81e084cb5
client-request-id: be203946-93b7-47f6-b402-edbd0ed49653
Set-Cookie: ClientId=LSM5BXAUPUIJBVFLY0LDA; expires=Tue, 16-Feb-2016 23:55:39 GMT; path=/; secure; HttpOnly
X-CalculatedBETarget: co1pr07mb316.namprd07.prod.outlook.com
OData-Version: 4.0
X-DiagInfo: CO1PR07MB316
X-BEServer: CO1PR07MB316
X-AspNet-Version: 4.0.30319
Set-Cookie: exchangecookie=7b08adfab00641009c1cbbf90594797d; expires=Tue, 16-Feb-2016 23:55:40 GMT; path=/; HttpOnly
Set-Cookie: X-BackEndCookie2=3bd486f8-787b-435b-8269-5359cdbcc7ce=u56Lnp2ejJqBxsmZysiemc/SyMmazNLLyJvO0sbGxs3Smc+bm87Pz8+dm8aegYHNz87K0s/M0s7Hq83MxcrKxcvJgZGeko+Nm8/I0Y+NkJvRkIqLk5CQlNGckJI=; expires=Wed, 18-Mar-2015 23:55:46 GMT; path=/api; secure; HttpOnly
Set-Cookie: X-BackEndCookie=3bd486f8-787b-435b-8269-5359cdbcc7ce=u56Lnp2ejJqBxsmZysiemc/SyMmazNLLyJvO0sbGxs3Smc+bm87Pz8+dm8aegYHNz87K0s/M0s7Hq83MxcrKxcvJ; expires=Wed, 18-Mar-2015 23:55:46 GMT; path=/api; secure; HttpOnly
X-Powered-By: ASP.NET
X-FEServer: DM2PR09CA0014
Date: Mon, 16 Feb 2015 23:55:45 GMT
Content-Length: 111

-> "{\"error\":{\"code\":\"ErrorInternalServerError\",\"message\":\"Object reference not set to an instance of an object.\"}}"

对不起,这个奇怪的错误!我当然想了解更多。您可以添加到您的请求中,重现错误,并让我知道那篇文章中HTTP响应头的值吗?

在按主题筛选某些事件时,我遇到了这个问题,其中有些事件没有主题


我通过在过滤查询中包含
Subject ne null
解决了这个问题

通过与我们的用户调查,它似乎可能与请求失败时日历中存在的外部来源的事件相关联。有任何线索或更新吗?没有,不过最好收集这些外部来源事件的例子,看看是否可以复制。例如,如果用户将事件另存为MSG文件,并将其复制到测试邮箱中,是否可以重现错误?如果是的话,我很乐意进一步调试它。有没有一种方法可以将这个客户端工具添加到SDK中?哪一种?有几个:)Office 365 SDK,我使用的是.NET版本