更新项目类别时出现 EWS 错误
使用 EWS(登录到 Exchange 2007 SP1)对 VB .Net 应用程序中的项目调用 Update() 方法时,出现以下错误:
属性更新未成功
可能是什么原因?
我真的希望这不是因为 EWS 要求 Exchange 2010 更新项目的类别。我对该项目所做的唯一更新是添加类别。
编辑:
此外,以下代码可以复制消息并更新其类别,效果很好。因此,看起来只是更改现有消息的类别属性才是问题所在。
Dim itmMessage2 = itmMessage.Copy(itmMessage.ParentFolderId)
itmMessage2.Categories.Add(strCategoryName)
itmMessage2.Update(ConflictResolutionMode.AlwaysOverwrite)
干杯, 戴夫
I get the following error when calling the Update() method on an Item in my VB .Net application using EWS (logged on to Exchange 2007 SP1):
Property update did not succeed
What could be the cause?
I'm really hoping this is not due to EWS requiring Exchange 2010 to update categories on an item. The only update I made to the item was to Add a category.
EDIT:
Also, the following code, which makes a copy of the message and updates its category works fine. So it looks like it's only changing the category property for existing messages that's the problem.
Dim itmMessage2 = itmMessage.Copy(itmMessage.ParentFolderId)
itmMessage2.Categories.Add(strCategoryName)
itmMessage2.Update(ConflictResolutionMode.AlwaysOverwrite)
Cheers,
Dave
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道为什么这个解决方案有效,但它让我觉得我的 API 安装或我连接到的 Exchange 2007 SP 1 服务器上的某些内容略有损坏:
我通过一个 bind() 请求发送了 every ItemSchema 属性(因此不包括 2010 特定的 UniqueBody 等)。
现在我原来的代码工作正常。
即使在我删除所有属性请求后,它仍然可以正常工作!
去算算吧。 :|
I have no idea why this solution worked, but it makes me think something was slightly broken with either my API installation, or on the Exchange 2007 SP 1 server I'm connecting to:
I sent through a bind() request asking for every ItemSchema property that Exchange 2007 supports (so not UniqueBody etc. which is 2010 specific).
Now my original code is working fine.
And it stays working just fine even after I remove all the property requests!
Go figure. :|
当尝试使用包含逗号的字符串更新类别时,我遇到了类似的“属性更新未成功”问题。
删除逗号字符解决了我的问题。
I've faced a similar "Property update did not succeed" problem when tried to update the Category with a string containing a comma.
Removing comma character solved my problem.