none
Access denied error code 11 RRS feed

  • Question

  • I am able to insert weight and height values into healthvault ppe by the below code:

    public void SetWeightOnHealthVault(double weightValue)
            {
                if (!_isProvisioned)
                {
                    MessageBox.Show("Please provision application first");
                    return;
                }

                HealthClientAuthorizedConnection connection =
                    HealthClientApplication.CreateAuthorizedConnection(PersonId);

                HealthRecordAccessor accessor = new HealthRecordAccessor(connection, RecordId);
                Weight weight = new Weight();
                weight.Value = new WeightValue(weightValue);
                accessor.NewItem(weight);
            }

    similarly for height values as above i can able to save values 

    but when i  am not  able to insert  allergy and blood pressure values into healthvault ppe ,am getting

    An unhandled exception of type 'Microsoft.Health.HealthServiceAccessDeniedException' occurred in Microsoft.Health.dll

    Additional information: Access is denied error ,below is the code am using  to save allergy

    public void setallergy(string val)
            {
                if (!_isProvisioned)
                {
                    MessageBox.Show("Please provision application first");
                    return;
                }
     HealthClientAuthorizedConnection connection =
                    HealthClientApplication.CreateAuthorizedConnection(PersonId);
               HealthRecordAccessor accessor = new HealthRecordAccessor(connection, RecordId);
                Allergy weight = new Allergy();
                weight.Name = new CodableValue(val);
                accessor.NewItem(weight);//in this line am getting access denied 
            }  have changed the data type in application configuration center waited for 30 min after updation am not able Resolve this Error ?could Any one suggest me Where am going wrong 

    

    

    Thursday, May 25, 2017 11:31 AM

Answers

  • If you changed the application setting (rules) at application configuration center, you will need to authorize your test account/record again. Existing authorization will not be impacted by application configuration change. 

    Takashi Moriyama | Senior Program Manager | Microsoft Health

    Tuesday, May 30, 2017 5:18 PM
    Moderator