.net - VB .NET Microsoft.Exchange.WebServices.Data 任务 - 类 - 从电子邮件中查找 BillingInformation 和里程值 - 语法
问题描述
获取错误:服务返回的项目类型 (EmailMessage) 与请求的项目类型 (Task) 不兼容。
我试图找到的价值:
Dim value As String
Dim service1 As ExchangeService = New
ExchangeService(ExchangeVersion.Exchange2013, easternZone)
service1.Credentials = New WebCredentials(UserID, Password)
service1.Url = New Uri("https://outlook.office365.com/EWS/Exchange.asmx")
Dim findResults As FindItemsResults(Of Item) = service1.FindItems(folderID1, unReadFilter, New ItemView(50))
For Each item As Item In findResults
Dim val = item.Id.ToString()
mytask1 = Task.Bind(service1, val)
value = mytask1.Mileage.ToString() Next
这是来自通过 Exchange .WebServices 的电子邮件消息。数据类。当我们为“Millage”或“Billing information”等电子邮件属性添加值时 - 我们可以找到这些可用的。
我收到以下错误:
- ex {"The item type returned by the service (EmailMessage) isn't compatible with the requested item type (Task)."} System.Exception {Microsoft.Exchange.WebServices.Data.ServiceLocalException}
我正在使用 Microsoft 文档中的参考来制作代码:
- 非常感谢任何帮助 - 我从过去几天开始陷入困境。
- 我是 Exchange 服务类的初学者。错误截图
解决方案
@Glen 请在下面找到错误截图: 尝试使用扩展属性定义时出现错误
推荐阅读
- laravel - 2 种多对多关系的方式只在 NeoEloquent 的一侧工作
- javascript - 如何将响应解析和测试为数组中的键/值
- java - 无法获取 CONSTRUCT 查询的结果
- excel - 如何从选择中定位特定范围的单元格?
- c++ - 如何在其他模板类中专门化模板类?
- osmdroid - 未调用 myLocationOverlay.runOnFirstFix 的可运行且 getMyLocation() 为空
- theorem-proving - 用 HOL 中的假设证明目标
- google-apps-script - 如果相邻单元格不为空,则复制单元格值
- jenkins - Jenkins:当上游被中止时如何停止下游项目
- c# - 如何使 .NET 代码输出更小的二进制文件