Re: How to write a GUI-less page

Discussion in 'ASP .Net' started by Chris Jackson, Aug 21, 2003.

  1. There is certainly a way to do this, but I am wondering why you don't simply
    implement a web service? The problem you are trying to solve is exactly the
    problem that they address.

    --
    Chris Jackson
    Software Engineer
    Microsoft MVP - Windows XP
    Windows XP Associate Expert
    --
    "Alek Davis" <alek_DOT_davis_AT_intel_DOT_com> wrote in message
    news:...
    > Hi,
    >
    > I need to implement a health check page as part of a Web site. This page

    is
    > supposed to be invoked programmatically from a script and it does not need
    > any GUI. When the script attempts to access the page, it is supposed to
    > query the HTTP status code (e.g. 200, 500, etc), to determine whether the
    > operation was successful or not. So how can I programmatically make the

    ASPX
    > return a status code without generating any HTML output? I tried this:
    >
    > (1) Set EnableViewState="false" EnableViewStateMac="false" in the @Page
    > directive of the ASPX
    > (2) Set Response.StatusCode to the appropriate status code, e.g. 500 in

    the
    > Page_Load, followed by Response.End.
    >
    > This seems to work on one system (VS.NET 2002 used to build the project +
    > VS.NET 2003 also installed + CLR 1.0 + CLR 1.1), i.e. when an error status
    > code is returned, it is shown in the IE window. When I attempt to do the
    > same on another system (VS.NET 2002 + CLR 1.0), errors are never

    generated,
    > i.e. the browser always displays a blank page irrespective of the returned
    > status code.
    >
    > Am I not doing this correctly? Is there a better way of accomplishing the
    > same?
    >
    > Thanks,
    >
    > Alek
    >
    >
     
    Chris Jackson, Aug 21, 2003
    #1
    1. Advertising

  2. Chris Jackson

    Alek Davis Guest

    This would be to easy ;-). Actually, I am not sure that the monitoring (MOM)
    script can call a Web service. I was told by the team in charge of
    monitoring that one of the health check options is attempt to access a Web
    page (other options are testing the status of a Windows services, etc), so I
    assume that the script can handle HTTP codes. But I doubt that it can call a
    Web service.

    Alek

    "Chris Jackson" <> wrote in message
    news:...
    > There is certainly a way to do this, but I am wondering why you don't

    simply
    > implement a web service? The problem you are trying to solve is exactly

    the
    > problem that they address.
    >
    > --
    > Chris Jackson
    > Software Engineer
    > Microsoft MVP - Windows XP
    > Windows XP Associate Expert
    > --
    > "Alek Davis" <alek_DOT_davis_AT_intel_DOT_com> wrote in message
    > news:...
    > > Hi,
    > >
    > > I need to implement a health check page as part of a Web site. This page

    > is
    > > supposed to be invoked programmatically from a script and it does not

    need
    > > any GUI. When the script attempts to access the page, it is supposed to
    > > query the HTTP status code (e.g. 200, 500, etc), to determine whether

    the
    > > operation was successful or not. So how can I programmatically make the

    > ASPX
    > > return a status code without generating any HTML output? I tried this:
    > >
    > > (1) Set EnableViewState="false" EnableViewStateMac="false" in the @Page
    > > directive of the ASPX
    > > (2) Set Response.StatusCode to the appropriate status code, e.g. 500 in

    > the
    > > Page_Load, followed by Response.End.
    > >
    > > This seems to work on one system (VS.NET 2002 used to build the project

    +
    > > VS.NET 2003 also installed + CLR 1.0 + CLR 1.1), i.e. when an error

    status
    > > code is returned, it is shown in the IE window. When I attempt to do the
    > > same on another system (VS.NET 2002 + CLR 1.0), errors are never

    > generated,
    > > i.e. the browser always displays a blank page irrespective of the

    returned
    > > status code.
    > >
    > > Am I not doing this correctly? Is there a better way of accomplishing

    the
    > > same?
    > >
    > > Thanks,
    > >
    > > Alek
    > >
    > >

    >
    >
     
    Alek Davis, Aug 21, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jerry III

    Re: How to write a GUI-less page

    Jerry III, Aug 22, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    424
    Jerry III
    Aug 22, 2003
  2. Giscard

    Re: How to write a GUI-less page

    Giscard, Aug 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    320
    Alek Davis
    Aug 22, 2003
  3. jiajia wu
    Replies:
    0
    Views:
    383
    jiajia wu
    Oct 1, 2009
  4. 6668
    Replies:
    0
    Views:
    175
  5. lllll
    Replies:
    0
    Views:
    164
    lllll
    Jun 8, 2009
Loading...

Share This Page