locked
Access Denied (Errorcode =11) RRS feed

  • Question

  • Hi,

    I have developed healthvault application in .net. It was working fine but suddenly i am getting "Access denied (Error code)" Error.

    • Moved by Min Zhu Wednesday, July 4, 2012 4:40 AM (From:.NET Base Class Library)
    Monday, July 2, 2012 1:41 PM

All replies

  • As you have no question and don`t show any code where you get the exception, what are we supposed to do ?

    Hannes

    If you have got questions about this, just ask.

    In a perfect world,
    users would never enter data in the wrong form,
    files they choose to open would always exist
    and code would never have bugs.

    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/

    Monday, July 2, 2012 1:44 PM
  • @Hannes,

    Thanks for reply.

    I am developing the registration work flow where i can upload the demograhpics for that patient and ask permisssion for access to his healthvault account. It was working fine.. But suddenly i am getting access denied Error.  Right Now it allows access for my application but on landing page of my application where i am getting an errorDo u have any idea why i am getting error msg?

    I tried creating another public key and upload it to the config center but still its not working.

    I am getting error on the following  bold line

    Code

    string url = Request.QueryString["ReturnUrl"];

                        string[] values = url.Split('?');
                        url = values[1];
                        string path = url.Substring(url.LastIndexOf("wctoken="));
                        path = path.Replace("wctoken=", string.Empty);


                        PatientPortal.BAL.clsBALRedirect oRedirect;
                        oRedirect = new PatientPortal.BAL.clsBALRedirect();
                        string personInfoXml = path;
                        string strEmail;
                       
                        if (!String.IsNullOrEmpty(personInfoXml))
                        {
                            Microsoft.Health.PersonInfo personInfo = WebApplicationUtilities.GetPersonInfo(personInfoXml);
                            oRedirect.PersonId = personInfo.PersonId.ToString();
                            oRedirect.RecordId = personInfo.SelectedRecord.Id.ToString();
                            oRedirect.UpdateHealthvaultId(PageToXML._username);
                            Response.Redirect("~/Account/PortalHome.aspx", true);
                        }

    Error Msg.

    {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.PlatformPrimitives.HealthVaultPlatformPerson.GetPersonInfo(ApplicationConnection connection)
       at Microsoft.Health.HealthVaultPlatform.GetPersonInfo(ApplicationConnection connection)
       at Microsoft.Health.Web.WebApplicationUtilities.GetPersonInfo(String authToken, Guid appId)
       at Microsoft.Health.Web.WebApplicationUtilities.GetPersonInfo(String authToken)
       at PatientPortalWebRole.Account.Login.Page_Load(Object sender, EventArgs e) in C:\AHS Projects\PatientPortalAzure\WebRole1\Account\Login.aspx.cs:line 57 Microsoft.Health.HealthServiceAccessDeniedException :StatusCode = AccessDenied :StatusCodeId = 11}

     Thanks,

    Amit Borse



    • Edited by Writepad Monday, July 2, 2012 2:32 PM
    Monday, July 2, 2012 2:29 PM
  • Amit,

    as these is related to Health, please try this forum instead: http://social.msdn.microsoft.com/Forums/en/healthvault/threads


    Hannes

    If you have got questions about this, just ask.

    In a perfect world,
    users would never enter data in the wrong form,
    files they choose to open would always exist
    and code would never have bugs.

    C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/

    • Proposed as answer by Mike Feng Tuesday, July 3, 2012 1:22 PM
    Monday, July 2, 2012 2:39 PM