locked
HV ApplicationManager doesn't start: HealthVaultApplicationManagerLibrary doesn't work anymore RRS feed

  • Question

  • When I tried to run the HealthVault ApplicationManager this morning, I received a message that the HealthVaultApplicationManagerLibrary doesn't work anymore. It was just a pop-up-window for a short time, telling about searching for a solution and then closing. It did not start.

    I already searched this forum and the Web and de- and re-installed the SDK (current version is the newest; 1.4....). I'm using Windows 7; Enterprise Edition, 64bit. This wasn't a problem the last few weeks. Although I did not have to use it before, I tried to run it "As Administrator", but that did and doesn't make any difference.

    Would be great, if someone had any ideas regarding this..

    And, already asking: There is often talked about the Health and Fitness-Example. Is there a reason why it's not to find in  the SDK-Tools anymore?

    Wednesday, October 6, 2010 1:05 PM

Answers

  • Sorry I wasn't clearer on my question.

    Have you installed / uninstalled anything related to visual studio recently?

    HealthVaultApplicationManagerLibrary is the description of the Application Manager program, so that's what shows up. I'm not sure why it's called that.

    • Marked as answer by Aneesh D Wednesday, January 12, 2011 2:47 AM
    Thursday, October 7, 2010 5:20 PM
  • Haha.

    I think I got it. I remembered one thing that is/was different between this PC and the other one, where the DataGrid worked well: I changed the Framework to .NET 4 here because I needed an attribute that wasn't available in earlier versions.

    I tried 2.0 and 3.5 now - it works with both of them.

    Edit: I think what you described is what I'm facing now: On a PostBack, the Grid will not be filled. But that didn't have anything to do with my problem :) and I do not have to specify actions - If don't, the grid isn't there. What do I have to do to show it after a PostBack?

    I think I don't need 4.0 in my current development, but If I will (it was the ClientIDMode-Attribute, to make it clear), will there be a workaround or update or bugfix or something, that all HealthVault types will work there?

    • Marked as answer by Aneesh D Wednesday, January 12, 2011 2:47 AM
    Monday, October 11, 2010 1:26 PM
  • DataChanged property indicates to the data grid that data has changed and it should be refreshed. When the PostBack is true, the items will be retrieved from the ViewState else PopulateGridView() method will be executed. As per my knowledge, this will not cause any issue.

    Thank you,
    Mahesh
    • Marked as answer by Aneesh D Wednesday, January 12, 2011 2:47 AM
    Tuesday, October 12, 2010 3:11 PM

All replies

  • Hello,

    I could not repro this issue on my side. I have checked this with Windows 7, 32 bit machine. I will check with 64 bit and let you know the update.
    Meanwhile, can you please check this in the alternate machine if it is available.

    Health and Fitness sample: It was a more complex sample that strove to demonstrate the best Practices in software design, such as caching, should be incorporated into a HealthVault application. But this application wasn't as quick-and-easy to understand and we didn't feel like our partners were really looking to us for non-HealthVault guidance, so we decided to deprecate this sample.

    Thank you,
    Mahesh
    Wednesday, October 6, 2010 2:49 PM
  • Have you done anything with Visual Studio recently? Application Manager talks with VS when it sets up applications, and it's possible that something is causing problems there.

    It also talks to the crypto services when it starts, but I think it's unlikely that it's hitting an issue there.

     

    Wednesday, October 6, 2010 4:32 PM
  • Yes, of course. I've been developing my applications or, at least, made some changes. (They still run without problems.) The only "problem" that occured was that I could not use the HealthRecordItemDataGrid, I got an exception - when I remember correct a file like HealthRecordItemDataGrid.cs couldn't be found or something similar. (Can't reproduce it here, different PC; but even the example from the Forum posted by Eric in 2008 didn't work.) I'm not sure whether it was before or after trying to use the App Manager, but I don't think this might be the reason for the App-Manager-problem..

    I can't remember using the App Manager yesterday, but I'm sure I did on Monday - then everything was okay.

    What is the HealthVaultApplicationManagerLibrary? Or else, what is meant with those expression? Maybe that gives me a hint ;)

    Wednesday, October 6, 2010 5:07 PM
  • Could you please send me the exact error you are getting when you are working with HealthRecordItemDataGrid?

    Regarding the Application Manager Library issue, I will contact the technical team internally and will let you know the update soon.

    Thank you,
    Mahesh

    Thursday, October 7, 2010 4:16 PM
  • Sorry I wasn't clearer on my question.

    Have you installed / uninstalled anything related to visual studio recently?

    HealthVaultApplicationManagerLibrary is the description of the Application Manager program, so that's what shows up. I'm not sure why it's called that.

    • Marked as answer by Aneesh D Wednesday, January 12, 2011 2:47 AM
    Thursday, October 7, 2010 5:20 PM
  • After trying the HealthRecordItemDataGrid on another PC and seeing it work, I think there went something wrong within the SDK or whatever ;) (Until then I thought it might be not implemented in the current version as the last posts here I found were from 2008.)

    Well, the exception is the following (I hope you don't mind it's in German - I could also translate it if necessary ;))

    System.TypeLoadException wurde nicht von Benutzercode behandelt.
      Message=Die Methode "Microsoft.Health.Web.ActionTemplate..ctor(Microsoft.Health.Web.HealthRecordItemDataGrid)" ist eine SecurityTransparent-Methode, ist jedoch ein Member eines sicherheitskritischen Typs.
      Source=Microsoft.Health.Web
      TypeName=Microsoft.Health.Web.ActionTemplate..ctor(Microsoft.Health.Web.HealthRecordItemDataGrid)
      StackTrace:
           bei Microsoft.Health.Web.HealthRecordItemDataGrid.AddActionLinksOnPostback()
           bei Microsoft.Health.Web.HealthRecordItemDataGrid.CreateChildControls() in e:\src\hsg-hv-main\private\hv\prod\src\sdk\web\HealthRecordItemDataGrid.cs:Zeile 115.
           bei System.Web.UI.Control.EnsureChildControls()
           bei System.Web.UI.Control.PreRenderRecursiveInternal()
           bei System.Web.UI.Control.PreRenderRecursiveInternal()
           bei System.Web.UI.Control.PreRenderRecursiveInternal()
           bei System.Web.UI.Control.PreRenderRecursiveInternal()
           bei System.Web.UI.Control.PreRenderRecursiveInternal()
           bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
      InnerException:

     Concerning the Visual Studio: I only remember one thing (but can't say the exact date of it): I activated the IIS a few days ago because I thought I might need it. When it came out, that it was unnecessary, I deactivated it.

    Friday, October 8, 2010 6:30 AM
  • I am unable to repro the issue when dealing with HealthRecordItemDataGrid. Could you please send me the piece of code that you are doing with HealthRecordItemDataGrid. 

    As this issue is specific to the single machine and you are not able to repro on another PC, can you confirm whether you made any changes to Visual Studio. As Eric said, this may be causing the issues with Application Manager. You will not face any issues activating IIS.

    Thank you,
    Mahesh
    Friday, October 8, 2010 10:29 AM
  • can you confirm whether you made any changes to Visual Studio. As Eric said, this may be causing the issues with Application Manager. You will not face any issues activating IIS.


    No, I did not make any changes. At least I can't remember anything but developing.

    I took the code from this thread: http://social.msdn.microsoft.com/forums/en-US/healthvault/thread/b6c98836-614f-4426-98a8-fd398fcf3700/ , but used the Medication-Type instead of Height. The DataGrid is in a View, part of a MultiView. I can start the application without exception; it comes when I click the link/button to "open" the View  that contains the DataGrid.

    <%@ Register TagPrefix="HV" Namespace="Microsoft.Health.Web" Assembly="Microsoft.Health.Web" %>
    <HV:HealthRecordItemDataGrid ID="c_itemDataGrid" runat="server" />
    
    c_itemDataGrid.FilterOverride = new HealthRecordFilter();
    c_itemDataGrid.FilterOverride.TypeIds.Add(Medication.TypeId);
    

    I got the same exception when I tried the "full" version Eric posted there with the Hello-World-Example, that means open it and overwrite the code.

    Friday, October 8, 2010 12:12 PM
  • Could you please let me know whether you are able to populate Height items using Height data type. Please let me know the Application ID you are using. The code looks fine and it should not create any issue. Are you using Hello world application that came with the SDK?

    Thank you,
    Mahesh
    Friday, October 8, 2010 1:42 PM
  • Using Height items doesn't make any difference - same exception. In this case, it is not the HelloWorld-App but one of mine. (The App works well, when I don't use the DataGrid.) App-ID is 255366b7-e802-4a33-9c18-906a62c3e03f.

    I also tried with the Hello World-app (not today, but on Wednesday) - was the same.

     

    Friday, October 8, 2010 2:08 PM
  • Along with the SDK,  you can also find the source code for the .Net SDK. Please look at the installation folder (C:\Program Files\Microsoft HealthVault\SDK\Source) where you can find the Zipped code files. Please unzip it and check whether the issue will be resolved. Once you unzip it, you can look inside the Web folder for HealthRecordItemDataGrid.cs file.

    Thank you,
    Mahesh
    Friday, October 8, 2010 3:44 PM
  • I tried to debug more further to get the part where the exception is thrown.

    I opened HealthRecordItemDataGrid.cs and got that far, that it is in  

     protected override void CreateChildControls()
        {
          base.CreateChildControls();
    
          // Set the GridView properties      
          gridView.AutoGenerateColumns = false;
          gridView.RowDataBound +=
            new GridViewRowEventHandler(OnRowDataBound);
    
          if (!String.IsNullOrEmpty(_alternatingRowCssClass))
          {
            gridView.AlternatingRowStyle.CssClass =
              _alternatingRowCssClass;
          }
    
          gridView.PageIndexChanging +=
            new GridViewPageEventHandler(GridView_PageIndexChanging);
          gridView.AllowPaging = true; 
          
          if (Page.IsPostBack)
          {
            AddActionLinksOnPostback();
          }
        }
    

    at "AddActionLinksOnPostback();

    I'm not able to go into this method, even if it's in the same code file (region "Server-Side Actions").

    private void AddActionLinksOnPostback()
        {
          if (this.HaveValidActions())
          {
            for (int i = 0; i < this.gridView.Rows.Count; ++i)
            {
              GridViewRow row = this.gridView.Rows[i];
              TableCell cell = row.Cells[row.Cells.Count - 1];
              AddActionLinksToContainer(cell, i, null);
            }
          }
        }
    
    So, that doesn't solve the problem :( because I don't know where the exact problem is.

    Monday, October 11, 2010 7:50 AM
  • AddActionLinksOnPostback() method will be executed only when the Page IsPostBack is true. Could you please check whether PopulateGridView() method is being executed?

    Thank you,
    Mahesh
    Monday, October 11, 2010 9:55 AM
  • AddActionLinksOnPostback() is executed - I have a breakpoint on that line and it is reached (there is a postback when I click a button to show another view).

    PopulateGridView() is not executed - it is not reached before AddActionLinksOnPostback..

    I checked with the HelloWorld-App (and the only-DataGrid-Code) as there is no Postback. I get an exception in at AddDisplayColumn(cdef,cdef.Caption,filter) (in PopulateGridView)

    I wasn't able to enter that method.

    System.TypeLoadException wurde nicht von Benutzercode behandelt.
      Message=Die Methode "Microsoft.Health.Web.GridViewAuditActionTemplate..ctor(Microsoft.Health.Web.TemplateType, System.String, System.String)" ist eine SecurityTransparent-Methode, ist jedoch ein Member eines sicherheitskritischen Typs.
      Source=Microsoft.Health.Web
      TypeName=Microsoft.Health.Web.GridViewAuditActionTemplate..ctor(Microsoft.Health.Web.TemplateType, System.String, System.String)
      StackTrace:
           bei Microsoft.Health.Web.HealthRecordItemDataGrid.AddDisplayColumn(DataColumn cdef, String columnHeader, HealthRecordFilter filter)
           bei Microsoft.Health.Web.HealthRecordItemDataGrid.PopulateGridView() in e:\src\hsg-hv-main\private\hv\prod\src\sdk\web\HealthRecordItemDataGrid.cs:Zeile 764.
           bei Microsoft.Health.Web.HealthRecordItemDataGrid.OnPreRender(EventArgs e) in e:\src\hsg-hv-main\private\hv\prod\src\sdk\web\HealthRecordItemDataGrid.cs:Zeile 81.
           bei System.Web.UI.Control.PreRenderRecursiveInternal()
           bei System.Web.UI.Control.PreRenderRecursiveInternal()
           bei System.Web.UI.Control.PreRenderRecursiveInternal()
           bei System.Web.UI.Control.PreRenderRecursiveInternal()
           bei System.Web.UI.Control.PreRenderRecursiveInternal()
           bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
      InnerException:

    Monday, October 11, 2010 10:02 AM
  • PopulateGridView() will be executed when the page is loaded or IsPostBack is false. You can check this by placing a break point in the PopulateGridView() method. If the data type has the items, the items will be displayed in the data grid. If I understand correctly, AddActionLinksOnPostback() method is being executed now, but the condition HaveValidActions() is false. In order to make the condition true, we need to specify Actions that can be configured through attributes of the HealthRecordItemDataGrid element in an aspx file. When an action is specified a column is automatically added to the data grid and the action link is added to the column. We need to specify ActionLabels and ActionCommands property in the aspx file for HealthRecordItemDataGrid.

    Please let me know if I missed anything.

    Thank you,
    Mahesh
    Monday, October 11, 2010 10:40 AM
  • I don't think it has something to do with those attributes.. (Then they had to be specified in each program using the Grid, hadn't they?)

    Well, I think it has (in the case of the simple Hello-World-App, modified that it should only show the DataGrid), which has the exception in PopulateGridView, to do with any security-aspect.

    In Line 866 of HealthRecordItemDataGrid.cs

    tfield.ItemTemplate =
                  new GridViewAuditActionTemplate(
                    TemplateType.Item,
                    cdef.ColumnName,
                    columnHeader);

    a new instance of GridViewAuditActionTemplate should be created. I can't debug the AddDisplayColumn-Method, but I can see the variables used as parameters for it. There is a foreach-loop to call it

     foreach (DataColumn cdef in dataColumns)
            {
              AddDisplayColumn(
                cdef,
                cdef.Caption,
                filter);
            }

    I get the exception already the first time to call it - and that is the "when"- Column (ColumnName is "when") - and the GridViewAuditActionTemplate-Constructor shouldn't be called there.. [That is what it seems to me - whether I push F10 oder F11 in Debug-Modus - the exception comes]

    In my frustration ;), I activated some parts of the IIS back again - and what happened? I'm able to open the HV App-Manager again... But the DataGrid-problems are still there. Maybe I should do a Visual-Studio-Reparation.. just for fun.

     

    Monday, October 11, 2010 12:23 PM
  • Haha.

    I think I got it. I remembered one thing that is/was different between this PC and the other one, where the DataGrid worked well: I changed the Framework to .NET 4 here because I needed an attribute that wasn't available in earlier versions.

    I tried 2.0 and 3.5 now - it works with both of them.

    Edit: I think what you described is what I'm facing now: On a PostBack, the Grid will not be filled. But that didn't have anything to do with my problem :) and I do not have to specify actions - If don't, the grid isn't there. What do I have to do to show it after a PostBack?

    I think I don't need 4.0 in my current development, but If I will (it was the ClientIDMode-Attribute, to make it clear), will there be a workaround or update or bugfix or something, that all HealthVault types will work there?

    • Marked as answer by Aneesh D Wednesday, January 12, 2011 2:47 AM
    Monday, October 11, 2010 1:26 PM
  • Could you please let me know whether you are trying to get the Audit Columns. Please check the code below and let me know if this works:

    c_itemDataGrid.ShowAuditColumns = true;
    HealthRecordFilter filter = new HealthRecordFilter(Medication.TypeId);
    filter.View.Sections = HealthRecordItemSections.All;
    c_itemDataGrid.FilterOverride = filter;

    Thank you,
    Mahesh
    Monday, October 11, 2010 1:58 PM
  • I don't know! I only put a DataGrid to my View, a  added a filter to the DataGrid and debugged the Code on execution. (That were 4 additional lines, like posted above:

    <%@ Register TagPrefix="HV" Namespace="Microsoft.Health.Web" Assembly="Microsoft.Health.Web" %>
    <HV:HealthRecordItemDataGrid ID="c_itemDataGrid" runat="server" />
    
    c_itemDataGrid.FilterOverride = new HealthRecordFilter();
    c_itemDataGrid.FilterOverride.TypeIds.Add(Medication.TypeId);
    

    And that was just what was mentioned in the exception..

    For which use is the code you posted? In 3.5 it doesn't make any difference - no DataGrid after the Postback. In 4.0 -> same TypeLoadException.

     

    Monday, October 11, 2010 2:17 PM
  • The above code which I have mentioned above is to get the audit information. The code will work without any issues in 2.0 and 3.5.

    I can repro the issue with .Net Framework 4.0. I will contact the team internally and will update you soon.

    Thank you,
    Mahesh

    Monday, October 11, 2010 5:53 PM
  • Thanks, would be interesting to know.

    Concerning the Postback-"Problem" of the DataGrid: I set DataChanged to true on PostBack. That works (because PopulateGridView is called, see the following if ) I don't know if this causes any further problems.. Or is there another way to solve this? 

    if

     

     

    (this.Visible && (!Page.IsPostBack || this.DataChanged || !this.EnableViewState))

    {

    PopulateGridView();

    }

    Tuesday, October 12, 2010 8:48 AM
  • DataChanged property indicates to the data grid that data has changed and it should be refreshed. When the PostBack is true, the items will be retrieved from the ViewState else PopulateGridView() method will be executed. As per my knowledge, this will not cause any issue.

    Thank you,
    Mahesh
    • Marked as answer by Aneesh D Wednesday, January 12, 2011 2:47 AM
    Tuesday, October 12, 2010 3:11 PM