I use HealthVault SDK to manage master-child applications.
- 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
AppInfo.Update(OfflineMasterConnection);
After this: child application's PublicKeys are vanished, and any attempt to access the application causes "Access denied".
2. When I try to edit master application in the same manner, it looses its "Master" status besides loosing PublicKeys. All its child apps are broken.
Does anyone know the right way to edit existing HealthVault application?
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. 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. But I am glad to receive confirmation of this behavior from Microsoft.