Re: custom error 500 not loads

Discussion in 'ASP .Net' started by z. f., Oct 11, 2004.

  1. z. f.

    z. f. Guest

    yes, what you say regarding the status is understood, and anyway, in the
    error handler page i set the status code after an error handling code in
    order for it not to break the execution in case of error.
    the problem is not sending a different error code, it is handling the error.
    doesn't IIS have anyway to tell him that i want my error page to run even if
    the headers was sent already?
    this is crucial for large web sites when i can't control all of my pages!
    TIA, z.



    "Ken Schaefer" <> wrote in message
    news:...
    > Once you have send HTTP headers to the client, you can't send anymore,

    new,
    > headers to the client.
    >
    > For example you base page has already sent a HTTP Status 200 OK to the
    > client. But your custom 500 page would normally send HTTP Status 500
    > Internal Server Error. You can't send two different HTTP status to the
    > client, and you certainly can't send another HTTP header (eg status) after
    > you have sent HTTP body.
    >
    > Instead, you will have to implement your own error handling code within

    your
    > application, and have that error handling code (eg On Error Resume Next,

    or
    > JScript's Try...Catch) output the necessary messages.
    >
    > Cheers
    > Ken
    >
    >
    > "z. f." <> wrote in message
    > news:...
    > > Hi,
    > >
    > > in IIS6 i configured custom error 500 page.
    > > if i have error in my asp file after a "Response.Flush()", the error

    page
    > > is
    > > not loaded,
    > > and the error details is shown to the user.
    > >
    > > how can i disable this feature?
    > > i need the custom error page to run even if the page flushed the data
    > > befare
    > > the error!
    > >
    > > TIA, z.
    > >
    > >

    >
    >
    z. f., Oct 11, 2004
    #1
    1. Advertising

  2. z. f.

    Ken Schaefer Guest

    When you call Response.Flush() in your main page, you are already sending
    HTTP headers + first part of the HTTP body to the client. You can't then
    send different HTTP headers etc as part of your 500 error page.

    All, I notice now that you are sending this to an ASP.NET newsgroup, yet you
    refer to an ASP page, and also configuring the error page in IIS. For
    ASP.NET pages (not ASP), you configure 500 error handler in your web.config
    file *not* in IIS Manager. Can you confirm what type of page you are using?
    ASP or ASP.NET?

    Thanks

    Cheers
    Ken


    "z. f." <> wrote in message
    news:...
    > yes, what you say regarding the status is understood, and anyway, in the
    > error handler page i set the status code after an error handling code in
    > order for it not to break the execution in case of error.
    > the problem is not sending a different error code, it is handling the
    > error.
    > doesn't IIS have anyway to tell him that i want my error page to run even
    > if
    > the headers was sent already?
    > this is crucial for large web sites when i can't control all of my pages!
    > TIA, z.
    >
    >
    >
    > "Ken Schaefer" <> wrote in message
    > news:...
    >> Once you have send HTTP headers to the client, you can't send anymore,

    > new,
    >> headers to the client.
    >>
    >> For example you base page has already sent a HTTP Status 200 OK to the
    >> client. But your custom 500 page would normally send HTTP Status 500
    >> Internal Server Error. You can't send two different HTTP status to the
    >> client, and you certainly can't send another HTTP header (eg status)
    >> after
    >> you have sent HTTP body.
    >>
    >> Instead, you will have to implement your own error handling code within

    > your
    >> application, and have that error handling code (eg On Error Resume Next,

    > or
    >> JScript's Try...Catch) output the necessary messages.
    >>
    >> Cheers
    >> Ken
    >>
    >>
    >> "z. f." <> wrote in message
    >> news:...
    >> > Hi,
    >> >
    >> > in IIS6 i configured custom error 500 page.
    >> > if i have error in my asp file after a "Response.Flush()", the error

    > page
    >> > is
    >> > not loaded,
    >> > and the error details is shown to the user.
    >> >
    >> > how can i disable this feature?
    >> > i need the custom error page to run even if the page flushed the data
    >> > befare
    >> > the error!
    >> >
    >> > TIA, z.
    >> >
    >> >

    >>
    >>

    >
    >
    Ken Schaefer, Oct 11, 2004
    #2
    1. Advertising

  3. z. f.

    z. f. Guest

    i work with both,
    my problem is in asp, since with dot-net, i actually configure error handler
    regardless of headers was sent or not, as should be.
    i configure it in the global.asax onError event, and i not see any reason
    for any dot-net code running inside my application scope that will have an
    error and not being trapped.
    the problem of having such an option in ASP is un-acceptable and I need a
    solution for trapping errors in the application scope as with the
    configuration of error-handler page, except for the case when headers are
    already sent to the client.
    i don't care about th headers that wes sent, i just need to trap the error.

    Thanks,
    z.





    "Ken Schaefer" <> wrote in message
    news:...
    > When you call Response.Flush() in your main page, you are already sending
    > HTTP headers + first part of the HTTP body to the client. You can't then
    > send different HTTP headers etc as part of your 500 error page.
    >
    > All, I notice now that you are sending this to an ASP.NET newsgroup, yet

    you
    > refer to an ASP page, and also configuring the error page in IIS. For
    > ASP.NET pages (not ASP), you configure 500 error handler in your

    web.config
    > file *not* in IIS Manager. Can you confirm what type of page you are

    using?
    > ASP or ASP.NET?
    >
    > Thanks
    >
    > Cheers
    > Ken
    >
    >
    > "z. f." <> wrote in message
    > news:...
    > > yes, what you say regarding the status is understood, and anyway, in the
    > > error handler page i set the status code after an error handling code in
    > > order for it not to break the execution in case of error.
    > > the problem is not sending a different error code, it is handling the
    > > error.
    > > doesn't IIS have anyway to tell him that i want my error page to run

    even
    > > if
    > > the headers was sent already?
    > > this is crucial for large web sites when i can't control all of my

    pages!
    > > TIA, z.
    > >
    > >
    > >
    > > "Ken Schaefer" <> wrote in message
    > > news:...
    > >> Once you have send HTTP headers to the client, you can't send anymore,

    > > new,
    > >> headers to the client.
    > >>
    > >> For example you base page has already sent a HTTP Status 200 OK to the
    > >> client. But your custom 500 page would normally send HTTP Status 500
    > >> Internal Server Error. You can't send two different HTTP status to the
    > >> client, and you certainly can't send another HTTP header (eg status)
    > >> after
    > >> you have sent HTTP body.
    > >>
    > >> Instead, you will have to implement your own error handling code within

    > > your
    > >> application, and have that error handling code (eg On Error Resume

    Next,
    > > or
    > >> JScript's Try...Catch) output the necessary messages.
    > >>
    > >> Cheers
    > >> Ken
    > >>
    > >>
    > >> "z. f." <> wrote in message
    > >> news:...
    > >> > Hi,
    > >> >
    > >> > in IIS6 i configured custom error 500 page.
    > >> > if i have error in my asp file after a "Response.Flush()", the error

    > > page
    > >> > is
    > >> > not loaded,
    > >> > and the error details is shown to the user.
    > >> >
    > >> > how can i disable this feature?
    > >> > i need the custom error page to run even if the page flushed the data
    > >> > befare
    > >> > the error!
    > >> >
    > >> > TIA, z.
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >
    >
    z. f., Oct 11, 2004
    #3
    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. JavaQueries
    Replies:
    1
    Views:
    3,625
    John C. Bollinger
    Mar 1, 2005
  2. James
    Replies:
    2
    Views:
    9,066
    Jacek Dziedzic
    Nov 3, 2004
  3. Julia B

    Datagrid custom paging always loads page 1

    Julia B, Apr 11, 2006, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    308
    Julia B
    Apr 11, 2006
  4. Nadagouda

    Custom error page for 500 in webservices

    Nadagouda, May 17, 2005, in forum: ASP .Net Web Services
    Replies:
    4
    Views:
    187
    Nadagouda
    May 18, 2005
  5. Help Needed
    Replies:
    1
    Views:
    260
    Jason M. Murray
    Sep 19, 2003
Loading...

Share This Page