locked
HealthVault HelloWorld Application RRS feed

  • Question

  • I am trying to follow the instructions on How to Guide at  http://msdn.microsoft.com/en-us/healthvault/bb898801.aspx

    I created a project in Visual Studio 2008 with new ASP.NET website. The instructions on "Deriving From Health Service" are not very clear to me.

    In the default.aspx.cs I renamed the application class to HelloWorldClass and now my code looks like this :
    "
    public partial class HelloWorldPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
    "
    What is meant in the step 2 (Set the base type to HealthServicePage)?

    I hav done step 3 (
    Change the Page tag in default.aspx so that it inherits from the new name as well.) as shown in this code:
    <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="HelloWorldPage" %>

    Also completed step 4 (add the two HealthVault assemblies to the project:Add Microsoft.Health.dll and Microsoft.Health.Web.dll to the project.

    What do you mean in step 5: (
    1. Also add:
      1. using Microsoft.Health;
      2. using Microsoft.Health.ItemTypes;
      3. using Microsoft.Health.Web;
      4. using System.Collections.Generic;
      to the C# file, which gets the application compiling.) ?
    Thankyou for your help. I have worked on java, php, asp applications etc. but not on .NET.
    Friday, October 24, 2008 7:49 PM

Answers

  • I'm fairly sure the problem means that somewhere in your content page, you have controls (label or textbox for example) that lies outside a <asp:Content> tag.

    Also make sure that the content ID matches the ones in the master file. You mentioned that it was tied to the helloworld master page, so make sure that the Content tags are properly defined in the default.aspx file.
    Tuesday, October 28, 2008 8:13 PM

All replies

  • It's probably easiest if you take the HelloWorld sample that's installed with the SDK (c:\program files\microsoft healthvault\sdk\dotnet\websamples\helloworld   and start with that. It has the proper web.config file that's a bit of a pain to create on your own.

     

     

    Friday, October 24, 2008 9:18 PM
  • I created the HealthVault HelloWorld application with instructions from How to Guide on http://msdn.microsoft.com/en-us/healthvault/bb898801.aspx
    I copied the web.config from the sample HelloWorld application, also added redirect.aspx, redirect.aspx.cs from
    sample HelloWorld application as mentioned in the How to Guide. I added a master page (HelloWorld.master). Both redirect.aspx and default.aspx reference the master as MasterPageFile="~/HelloWorld.master".

    When I try to open default.aspx in the browser, I get the following error:
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:
    [HttpException (0x80004005): Content controls have to be top-level controls in a content page or a nested master page that references a master page.]
    System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +428
    System.Web.UI.Page.get_Master() +48
    System.Web.UI.Page.ApplyMasterPage() +18
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +685


    What is this problem?

    When I browse the sample HelloWorld Application in the browser, I get the login page and then the default.aspx page with Add Height Entry button.

    Thanks for your help.
    Monday, October 27, 2008 7:01 PM
  • I'm fairly sure the problem means that somewhere in your content page, you have controls (label or textbox for example) that lies outside a <asp:Content> tag.

    Also make sure that the content ID matches the ones in the master file. You mentioned that it was tied to the helloworld master page, so make sure that the Content tags are properly defined in the default.aspx file.
    Tuesday, October 28, 2008 8:13 PM
  •  

    hi..

    Can any body help me in running HealthVault Sample applications.

    I have MS visual studio 2005.

    I run the sample program  "HelloWorld".  Login Window comes and then when i log in an error page gets displayed

    "The operation is not allowed on non-connected sockets."

    what should i do ?????



    Thanks in advance

    Vaibhav

    Friday, January 30, 2009 6:58 AM