locked
Access is denied. RRS feed

  • Question

  • Can anyone please help me in this scenario..

    I have data retrieval web service which fetches health records from Production account and returns output.
    I have two copies of this service, one at localhost IIS and one at server IIS, the only difference is in web.config's for location of certificate files.
    Server copy was working fine, but 2 days ago I tried to fetch the records and gets this exception. Then I ran local copy,
    but it was able to fetch health records... with same session ID, same health data type, same certificate..

    The error I got from server copy is as below:

    Microsoft.Health.HealthServiceAccessDeniedException: Access is denied.
    at Microsoft.Health.EasyWebRequest.WaitForCompletion()
    at Microsoft.Health.EasyWebRequest.Fetch(Uri url)
    at Microsoft.Health.EasyWebRequest.Fetch(Uri url, IEasyWebResponseHandler customHandler)
    at Microsoft.Health.HealthServiceRequest.ExecuteInternal()
    at Microsoft.Health.HealthServiceRequest.Execute()
    at Microsoft.Health.Authentication.Credential.MakeCreateTokenCall(String methodName, Int32 version, HealthServiceConnection connection, Collection`1 appTokenCreationInfo)
    at Microsoft.Health.Authentication.Credential.MakeCreateTokenCall(String methodName, Int32 version, HealthServiceConnection connection, Guid appId, Boolean isMra)
    at Microsoft.Health.Authentication.Credential.CreateAuthenticatedSessionToken(HealthServiceConnection connection, Guid appId)
    at Microsoft.Health.Web.Authentication.WebApplicationCredential.AuthenticateKeySetPair(AuthSessionKeySetPairs keySetPairs, HealthServiceConnection connection, Guid applicationId, X509Certificate2 certificate)
    at Microsoft.Health.Web.Authentication.WebApplicationCredential.AuthenticateKeySetPair(HealthServiceConnection connection, Guid applicationId, X509Certificate2 certificate)
    at Microsoft.Health.Web.Authentication.WebApplicationCredential.Authenticate(HealthServiceConnection connection, Guid applicationId)
    at Microsoft.Health.Web.Authentication.WebApplicationCredential.AuthenticateIfRequired(HealthServiceConnection connection, Guid applicationId)
    at Microsoft.Health.Web.OfflineWebApplicationConnection.Authenticate()
    at Microsoft.Health.Web.OfflineWebApplicationConnection.CreateRequest(String methodName, Int32 methodVersion, Boolean forAuthentication)
    at Microsoft.Health.HealthServiceConnection.CreateRequest(String methodName, Int32 methodVersion)
    at Microsoft.Health.ApplicationConnection.GetPersonInfo()
    at QueryHealthDataService.QueryHealthData.RetrieveRecordsFromHV(String[] HeathDataTypeName_ID, Int32& ResponseCode) in D:\BlackBerry_HealthDiaryWebService\Ganesh_Query\QueryHealthDataService_HV\QueryHealthDataService_HV\QueryHealthDiary_HV.asmx.cs:line 362
    at QueryHealthDataService.QueryHealthData.GetUserHealthData_HV(String SessionId, String HealthDataTypeCode, String StartDatetime, String EndDatetime) in D:\BlackBerry_HealthDiaryWebService\Ganesh_Query\QueryHealthDataService_HV\QueryHealthDataService_HV\QueryHealthDiary_HV.asmx.cs:line 168

    I guess this is neither Certificate problem nor of ACC.. This should be related at my server IIS..
    Please let me know if any idea..
    Thanks in advance :)


    • Edited by Rohit Dhage Friday, January 27, 2012 10:38 AM
    Friday, January 27, 2012 10:05 AM

All replies

  • I have had cases before when the cert did not match what was present in ACC.  I've usually seen this be a Certificate issue.  More than likely the local cert does not match what is present within ACC/Production based on if your App is live or not.  If it is going off of PPE, then it would be what is present in ACC.
    Adam W. Saxton | Microsoft HSG Escalation Services | http://twitter.com/awsaxton
    Friday, January 27, 2012 1:43 PM
  • Also look slike this is the same issue from the following post - http://social.msdn.microsoft.com/Forums/en-US/healthvault/thread/5fdb96e8-e449-45ec-aca4-b6cc9cdf4e21
    Adam W. Saxton | Microsoft HSG Escalation Services | http://twitter.com/awsaxton
    Friday, January 27, 2012 1:46 PM