Event AFTER Response is sent ???

Discussion in 'ASP .Net' started by Ronald Geyeshock, Aug 17, 2004.

  1. Hello All,

    I am trying to find a way to process some logic in the code-behind of
    an ASP.Net page after a response has been sent back to the client.

    Basically, I want to be able to process some potentially
    time-consuming logic (statistics gathering) after every page without
    impacting the amount of time it takes to return the page to the
    client. I've tried putting this code in a few of the Application_
    events (like Application_PostRequestHandlerExecute and
    Application_ReleaseRequestState), but they all get processed before
    the response is actually sent to the client. I can call
    Response.Flush to send the content, but the "globe" will continue
    spinning on the client because the response is not complete.

    I'm surprised there isn't an event that can be called - or else maybe
    I just don't see one.

    Does anyone have any other ideas on how this could be done?

    Thanks in advance,

    Ronald G.
    Ronald Geyeshock, Aug 17, 2004
    #1
    1. Advertising

  2. You can do it by making a .dll and calling it from your web page. I had a
    similar problem - some calculations of my web based app take up to 3 minutes
    to complete, and that's unacceptable to an end user. So, I made a .dll,
    referenced it in the web app, and call a function that shell's an
    executable. The dll function completes as quickly as it is run, and the
    shelled .exe file does the calculations and posts the results to a database
    when it's complete.

    Steve



    "Ronald Geyeshock" <> wrote in message
    news:...
    > Hello All,
    >
    > I am trying to find a way to process some logic in the code-behind of
    > an ASP.Net page after a response has been sent back to the client.
    >
    > Basically, I want to be able to process some potentially
    > time-consuming logic (statistics gathering) after every page without
    > impacting the amount of time it takes to return the page to the
    > client. I've tried putting this code in a few of the Application_
    > events (like Application_PostRequestHandlerExecute and
    > Application_ReleaseRequestState), but they all get processed before
    > the response is actually sent to the client. I can call
    > Response.Flush to send the content, but the "globe" will continue
    > spinning on the client because the response is not complete.
    >
    > I'm surprised there isn't an event that can be called - or else maybe
    > I just don't see one.
    >
    > Does anyone have any other ideas on how this could be done?
    >
    > Thanks in advance,
    >
    > Ronald G.
    >
    Steve Caliendo, Aug 17, 2004
    #2
    1. Advertising

  3. you can try using asynchronous method call to the dll assembly.

    "Steve Caliendo" wrote:

    >
    > You can do it by making a .dll and calling it from your web page. I had a
    > similar problem - some calculations of my web based app take up to 3 minutes
    > to complete, and that's unacceptable to an end user. So, I made a .dll,
    > referenced it in the web app, and call a function that shell's an
    > executable. The dll function completes as quickly as it is run, and the
    > shelled .exe file does the calculations and posts the results to a database
    > when it's complete.
    >
    > Steve
    >
    >
    >
    > "Ronald Geyeshock" <> wrote in message
    > news:...
    > > Hello All,
    > >
    > > I am trying to find a way to process some logic in the code-behind of
    > > an ASP.Net page after a response has been sent back to the client.
    > >
    > > Basically, I want to be able to process some potentially
    > > time-consuming logic (statistics gathering) after every page without
    > > impacting the amount of time it takes to return the page to the
    > > client. I've tried putting this code in a few of the Application_
    > > events (like Application_PostRequestHandlerExecute and
    > > Application_ReleaseRequestState), but they all get processed before
    > > the response is actually sent to the client. I can call
    > > Response.Flush to send the content, but the "globe" will continue
    > > spinning on the client because the response is not complete.
    > >
    > > I'm surprised there isn't an event that can be called - or else maybe
    > > I just don't see one.
    > >
    > > Does anyone have any other ideas on how this could be done?
    > >
    > > Thanks in advance,
    > >
    > > Ronald G.
    > >

    >
    >
    >
    =?Utf-8?B?U2hhaWxlc2ggSmFubnU=?=, Aug 17, 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. Glen Wilkin via DotNetMonster.com

    Response.Redirect after Response.Flush

    Glen Wilkin via DotNetMonster.com, Apr 15, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    6,885
  2. Replies:
    5
    Views:
    559
    =?ISO-8859-1?Q?G=F6ran_Andersson?=
    Jun 12, 2007
  3. =?Utf-8?B?a3lvbmc=?=

    loading to session after response is sent.

    =?Utf-8?B?a3lvbmc=?=, Jul 19, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    430
    =?Utf-8?B?a3lvbmc=?=
    Jul 23, 2007
  4. Ilyas
    Replies:
    2
    Views:
    277
    George
    Nov 12, 2008
  5. Sunny Mohan
    Replies:
    0
    Views:
    198
    Sunny Mohan
    Apr 5, 2004
Loading...

Share This Page