locked
OfflineWebApplicationConnection returns a "person cannot be found" exception RRS feed

  • Question

  • When I tried to access data via a offline app, I met this

    "The unique identifier 32c78874-8e4e-4e04-bfcc-20a99d25b240 for the person cannot be found."

    my code is as below :

    Guid callingAppId = new Guid("30972d0e-2d58-4041-9bcc-6d1eb2626580");
                Guid offlinePersonId = new Guid("32c78874-8e4e-4e04-bfcc-20a99d25b240");
                Guid recordId = new Guid("ec67da02-5d77-4306-9061-2feed0fca187");
                string serviceUrl = "https://platform.healthvault-ppe.com/platform/";
    
                WebApplicationCredential cred = new WebApplicationCredential(callingAppId);
                OfflineWebApplicationConnection con = new OfflineWebApplicationConnection(cred,callingAppId,serviceUrl,offlinePersonId);
                con.Authenticate();
                con.RequestTimeoutSeconds = 300;
    
                HealthRecordAccessor accessor = new HealthRecordAccessor(con, offlinePersonId);
               // var records = con.GetAuthorizedRecords();
    
                HealthRecordSearcher searcher = accessor.CreateSearcher();
                HealthRecordFilter filter = new HealthRecordFilter(Height.TypeId);
                searcher.Filters.Add(filter);
    
                HealthRecordItemCollection recs = searcher.GetMatchingItems()[0];

    the appId , personId , and recordId are all got from a online app

    while the online app works quite well, I've no idea what's going wrong with my offline one.

    Anyone can help or share the same experience?

    Many Thanks.

    Tuesday, March 31, 2015 9:25 AM