Request-Response Tracing


The following may be useful for low-level debugging of the traffic between your application and the HealthVault servers.

  1. Make sure the account under which the ASP.NET worker process is running (w3wp.exe for W2K3 and Vista, aspnet_wp.exe for XP) has write access to the application directory.
  2. Open the web.config file.
  3. Add the following (if the system.diagnostics section already exists, just add the inner elements to the existing section):
            <source name="HealthVaultTraceSource"
                    switchType="System.Diagnostics.SourceSwitch" >
                    <add name="fileListener"
                        initializeData="sdk.log" />
                    <remove name ="Default" />
            <!-- You can set the level at which tracing is to occur -->
            <add name="HealthVaultTraceSourceSwitch" value="All" />
            <!-- You can turn tracing off -->
            <!--add name="HealthVaultTraceSourceSwitch" value="Off" -->
  4. Run the scenario, and look at the sdk.log file that is generated in the application directory. You may need to shut down the application to get the complete set of data from the tracing infrastructure.
  5. If the log file is not created and you are sure a request was made to HealthVault, change “sdk.log” to be the complete path to a directory that the ASP.NET worker process has write access to, and try again.