How to get a Healthvault .NET SDK example to run RRS feed

  • Question

  • Steps I've tried on my Win8 machine

    Attempt #1

    1.  Download and install the Healthvault .NET SDK.

    2. Select Programs>Microsoft Healthvault > SDK > Healthvault Application Manager

    3. Click "Create New HelloWorld Sample" button.  The following error dialog appears:

    Visual Studio is not installed.  This version of the HealthVault SDK supports Visual Studio 2010 (10.0) and higher.

    Note: I do have it.  Why is it not finding it?

    Attempt #2

    1. Navigate to C:\Users\Greg\Documents\Health Records\Microsoft HealthVault\SDK\DotNet\WebSamples\HelloWorldCertStore

    2. Double-click on HelloWorld.sln.  Microsoft Visual Studio 2012 Express for Web appears with 3 files loaded.

    3. Click the green Run arrow.  It compiles and runs.  Brings up Healthvault Login screen in firefox. 

    4. I log in to Healthvault, then a blank screen appears.

    5.  I notice a dialog open under the firefox window.  It's asking to locate HealthApplicationConfiguration.cs.  I search the computer and doesn't show up anywhere so I hit Cancel button.

    6. Another dialog opens asking for HealthServicePage.cs.  Again, it does not exist so I hit Cancel.

    7. Finally, an error appears: "SecurityException was unhandled by user code.  The specified certificate, CN=WildcatApp-05a059c9-c309-46af-9b86-b06d42510550, could not be found in the LocalMachine certificate store,or the certificate does not have a private key."

    Attempt #3

    Thinking that maybe something didn't get installed correctly I try to reinstall.

    1.  Bring up Microsoft.Health.chm located ind SDK>Docs

    2.  Click the "Download and install the SDK" link located in "Getting started with the HealthVault .NET SDK" section.

    3. Click the "Microsoft HealthVault >NET SDK installer" link.

    4. It appears this link is broken as it takes me to a generic Microsoft web page http://www.microsoft.com/en-us/default.aspx

    5. Googled "download Microsoft Visual Studio 2012 Express for Web".  Downloaded, ran, and selected "Repair" button.  Same problem.

    Attempt #4

    I modified the registry as described here:


    It had no affect.

    Good grief, is a simple HelloWorld example really supposed to be this difficult?

    • Edited by bluebutton Friday, May 23, 2014 3:52 AM
    Wednesday, May 21, 2014 6:28 PM

All replies

  • The majority of the problems you are running into are most likely a result of the version of Visual Studio that you have installed. The SDK application tool uses the VS automation interfaces to create the solution file on your behalf when you choose the "Create new Hello World" sample application.

    I am not sure what components are installed by the various visual studio SKU’s, but I will set up a VM and test the version you reported having issues with. In the meantime you may want to consider downloading the platform version for express.

    Visual Studio Download

    For the security exception, this is the result of trying to run the sample without adding the certificate used by the sample application, to your computers certificate store. If you examine the sample directory, you will find a sub-directory named cert.

    If you double click on the HelloWorld-SDK_ID-05a059c9-c309-46af-9b86-b06d42510550.pfx file in that directory, an installation wizard will launch allowing you to import the certificate to either the user or local certificate store.

    • Select Local Machine and click next.
    • Select next for remaining pages ( use defaults )
    • On the final page select the finish button.

    Once completed run the GrantCertificateRights_Win2003.bat file to grant permissions to NETWORK SERVICE for the certificate.

    Now the sample application should run as is with no issues.


    Friday, May 23, 2014 6:43 PM
  • Sean,

    I clicked the Visual Studio Download link you provided.  It offered 4 choices for download, none of which included the word "Platform".  I assumed you meant Microsoft Visual Studio Express 2013 for Windows Desktop.  I downloaded and installed that version, then opened the same HelloWorld.sln.  I clicked the green Run button and got the following error:

    This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
    For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
         - website, "C:\Users\Greg\Documents\Health Records\Microsoft HealthVault\SDK\DotNet\WebSamples\HelloWorldCertStore\website\"

    No changes required
    These projects can be opened in Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1 without changing them.
         - HelloWorld, "C:\Users\Greg\Documents\Health Records\Microsoft HealthVault\SDK\DotNet\WebSamples\HelloWorldCertStore\HelloWorld.sln"

    The migration report showed "

    website\: The application which this project type is based on was not found. Please try this link for further information: http://go.microsoft.com/fwlink/?LinkID=299083&projecttype=E24C65DC-7377-472B-9ABA-BC803B73C61A"

    I note that I do have a website folder here: C:\Users\Greg\Documents\Health Records\Microsoft HealthVault\SDK\DotNet\WebSamples\HelloWorldCertStore\website

    Next I double clicked on the HelloWorld-SDK_ID-05a059c9-c309-46af-9b86-b06d42510550.pfx as you suggested.  The Certificate Import Wizard appeared.  I selected Local Machine and clicked Next.  The wizard disappeared.  No way to know if it completed the operation.

    Next I double-clicked GrantCertificateRights_Win2003.bat.  Nothing seemed to happen so I opened a command shell and ran it from there.  Got the following error: "Unable to find or obtain a context for requested certificate"

    Any other suggestions?

    I tried the Microsoft Visual Studio 2013 for Web version too but got the same errors as 2012 version. "Additional information: The specified certificate, CN=WildcatApp-05a059c9-c309-46af-9b86-b06d42510550, could not be found in the LocalMachine certificate store,or the certificate does not have a private key."

    Is there another way to get the certificate installed?

    • Edited by bluebutton Saturday, May 24, 2014 3:06 PM
    Saturday, May 24, 2014 2:47 PM
  • You can use the ApplicationManager.exe tool found in the ..\Microsoft HealthVault\SDK\Tools directory to import the .pfx file. Use the "Import .pfx" button on the top right corner of the ApplicationManager UI, and navigate to the HelloWorld-SDK_ID-05a059c9-c309-46af-9b86-b06d42510550.pfx.


    Wednesday, May 28, 2014 5:10 PM