在执行数据恢复后,无法使用EWS将自定义属性添加到约会 [英] Unable to Add Custom Properties to Appointments using EWS after did a Data Recovery

查看:73
本文介绍了在执行数据恢复后,无法使用EWS将自定义属性添加到约会的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我开发了一个使用EWS的工具,该工具适用于每个用户日历上的特定约会子集。要分离这些约会,该工具会在创建它们时添加自定义属性。

它的功能非常好。但是,当我们进一步测试时,我们遇到了一个奇怪的问题。

在Exchange服务器遇到问题的情况下,sysadmin使用Exchange管理控制台卸载数据存储,还原以前的备份,以及重新安装数据存储。

Wierd问题发生了。一切正常:Outlook,OWA等,除了工具。工具
仍然可以创建约会,但所有这些都缺少自定义属性。看来,Exchange服务器方便地忽略了自定义属性。我们在数据恢复之前没有这样的问题。

有没有人有类似的经验或任何想法分享?

BTW:
该工具利用Exchange假冒。

这是插入自定义字段的代码片段。

Hi,

I've developed a tool using EWS that works on a specific subset of appointments on each user's calendar. To separate those appointments, the tool adds a custom property when creating them.

It functions very well. However, as we tested it further, we ran into a weird issue.

In a scenario when Exchange server ran into issues, the sysadmin dismounted the data store using
Exchange Management Console, restore previous backup, and re-mounted the data store.

Wierd issue happened. Everything is working fine: Outlook, OWA, etc., except the tool. The tool
can still create appointments, but the custom property is missing in all of them. It seems that
Exchange server convenient ignored the custom property. We didn't have such an issue before the
data recovery.

Does anyone have the similar experience or any idea to share?

BTW:
The tool utilizes Exchange Impersonation.

Here is the code snippet that inserts the custom field.

1 CalendarItemType calendarItem = < font style ="color:blue"> new CalendarItemType();
2
3 PathToExtendedFieldType orgTag = new PathToExtendedFieldType();
4 orgTag .PropertySetId = " 00020329-0000-0000-C000-000000000046" ;
5 orgTag.PropertyType = MapiPropertyTypeType.String;
6 orgTag.PropertyName = < font style ="color:blue">&orgnization" ;
7 ExtendedPropertyType orgProperty = new ExtendedPropertyType();
8 orgProperty .ExtendedFieldURI = orgTag;
9 orgProperty.Item = " MyOrg" ;
10
11
12 PathToExtendedFieldType itemTag = new PathToExtendedFieldType();
13 itemTag.PropertySetId = " 00020329 -0000-0000-C000-000000000046" ;
14 itemTag .PropertyType = MapiPropertyTypeType.String;
15 itemTag.PropertyName = " ItemTag" ;
16 ExtendedPropertyType itemProperty = new ExtendedPropertyType();
17 itemProperty.ExtendedFieldURI = itemTag;
18 itemProperty.Item = custom_field ;
19
20 calendarItem.ExtendedProperty = new ExtendedPropertyType [] {orgProperty,itemProperty};
1            CalendarItemType calendarItem = new CalendarItemType(); 
2        
3            PathToExtendedFieldType orgTag = new PathToExtendedFieldType(); 
4            orgTag.PropertySetId = "00020329-0000-0000-C000-000000000046"
5            orgTag.PropertyType = MapiPropertyTypeType.String; 
6            orgTag.PropertyName = "Orgnization"
7            ExtendedPropertyType orgProperty = new ExtendedPropertyType(); 
8            orgProperty.ExtendedFieldURI = orgTag; 
9            orgProperty.Item = "MyOrg"
10 
11 
12            PathToExtendedFieldType itemTag = new PathToExtendedFieldType(); 
13            itemTag.PropertySetId = "00020329-0000-0000-C000-000000000046"
14            itemTag.PropertyType = MapiPropertyTypeType.String; 
15            itemTag.PropertyName = "ItemTag"
16            ExtendedPropertyType itemProperty = new ExtendedPropertyType(); 
17            itemProperty.ExtendedFieldURI = itemTag; 
18            itemProperty.Item = custom_field; 
19 
20            calendarItem.ExtendedProperty = new ExtendedPropertyType[] { orgProperty, itemProperty }; 

推荐答案

另一个更新:
一旦我从00020329改变了GUID- 0000-0000-C000-000000000046至24040483-cda4-4521-bb5f-a83fac4d19a4,
均用于EWS手册中列出的示例代码中。该工具现在开始工作。

我现在正试图理解它。
Another Update:
Once I changed GUID from 00020329-0000-0000-C000-000000000046 to 24040483-cda4-4521-bb5f-a83fac4d19a4,
both are used in the sample code listed in the EWS book. The tool starts working now.

I'm trying to make sense out of it at this moment.


这篇关于在执行数据恢复后,无法使用EWS将自定义属性添加到约会的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆