简体   繁体   English

如何编辑现有的HealthVault应用程序?

[英]How to edit existing HealthVault application?

I use HealthVault SDK to manage master-child applications. 我使用HealthVault SDK来管理主子应用程序。

  1. Here is a brief excerpt of my actions (simple read - save) 这是我的动作的简短摘录(简单阅读-保存)

// get connection for master application

OfflineWebApplicationConnection OfflineMasterConnection = new OfflineWebApplicationConnection(masterAppId, WebApplicationConfiguration.HealthServiceUrl, Guid.Empty); // retrieve child application info ApplicationInfo AppInfo = HealthVaultPlatform.GetChildApplication(OfflineMasterConnection, childAppIdGuid); // save the child application

OfflineWebApplicationConnection OfflineMasterConnection = new OfflineWebApplicationConnection(masterAppId, WebApplicationConfiguration.HealthServiceUrl, Guid.Empty); // retrieve child application info ApplicationInfo AppInfo = HealthVaultPlatform.GetChildApplication(OfflineMasterConnection, childAppIdGuid); // save the child application

OfflineWebApplicationConnection OfflineMasterConnection = new OfflineWebApplicationConnection(masterAppId, WebApplicationConfiguration.HealthServiceUrl, Guid.Empty); // retrieve child application info ApplicationInfo AppInfo = HealthVaultPlatform.GetChildApplication(OfflineMasterConnection, childAppIdGuid); // save the child application

OfflineWebApplicationConnection OfflineMasterConnection = new OfflineWebApplicationConnection(masterAppId, WebApplicationConfiguration.HealthServiceUrl, Guid.Empty); // retrieve child application info ApplicationInfo AppInfo = HealthVaultPlatform.GetChildApplication(OfflineMasterConnection, childAppIdGuid); // save the child application

AppInfo.Update(OfflineMasterConnection);

After this: child application's PublicKeys are vanished, and any attempt to access the application causes "Access denied". 此后:子应用程序的PublicKeys消失了,任何尝试访问该应用程序的尝试都会导致“访问被拒绝”。

2. When I try to edit master application in the same manner, it looses its "Master" status besides loosing PublicKeys. 2.当我尝试以相同的方式编辑主应用程序时,除了失去了PublicKeys之外,它还失去了其“ Master”状态。 All its child apps are broken. 它的所有子应用程序均已损坏。

Does anyone know the right way to edit existing HealthVault application? 有谁知道编辑现有HealthVault应用程序的正确方法?

As I was explained: "Update" means "Replace", so after reading an appInfo you have to manually add all fields that was not received by any reason. 正如我所解释的:“更新”的意思是“替换”,因此在读取appInfo之后,您必须手动添加由于某种原因未收到的所有字段。 The most important is absence of PublicKeys. 最重要的是缺少公钥。 You have to add them again before each "Update". 您必须在每次“更新”之前再次添加它们。 I found this solution in a "hard way" when our demonstration system crashed: I added PublicKeys on each Update and the system start working again. 当我们的演示系统崩溃时,我以“困难的方式”找到了该解决方案:我在每个Update上添加了PublicKeys,然后系统再次开始工作。 But I am glad to receive confirmation of this behavior from Microsoft. 但是,我很高兴收到Microsoft对此行为的确认。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM