0

我正在尝试在我的 Exchange 服务器中读取公共日历(在公共文件夹中)。我将以下查询发送到我的 Exchange 服务器,服务器回复 400 - 错误请求。

<?xml version=""1.0""?>
<g:searchrequest xmlns:g=""DAV:"">
  <g:sql>
      SELECT
          ""urn:schemas:httpmail:subject"",
          ""urn:schemas:calendar:location"",
          ""urn:schemas:calendar:dtstart"",
          ""urn:schemas:calendar:dtend""
      FROM
          Scope('SHALLOW TRAVERSAL OF ""https://server/public/SomeFolder/SomeCalendar/""')
  </g:sql>
</g:searchrequest>

现在,相同的查询适用于此商店 URL: https://server/exchange/username/calendar/

所以我知道这是查询中错误的 URL。如果我将有问题的 URL 粘贴到我的网络浏览器中,它会显示日历,因此 URL 看起来确实不错。

任何帮助表示赞赏。

谢谢泽维尔

4

2 回答 2

0

尝试

https://server/public/SomeFolder/SomeCalendar/?cmd=contents

于 2009-06-05T07:49:52.390 回答
0

感谢 SillyMonkey 的输入。

您的 URL 返回了相同的错误,但我发现问题出在我为提交查询而连接的端点上。

我将查询发布到此 URI:

string uri = string.Format("{0}/exchange/{1}", server, credentials.UserName); 

现在将其更改为:

string uri = string.Format("{0}/public", server);

我有点惊讶我必须使用不同的端点,具体取决于我是查询用户邮箱还是公用文件夹,但它似乎就是这样。

于 2009-06-09T00:37:26.173 回答