473,387 Members | 1,517 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Event AFTER Response is sent ???

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.
rg********@yahoo.com
Nov 18 '05 #1
2 1520

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" <rg********@yahoo.com> wrote in message
news:15**************************@posting.google.c om...
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.
rg********@yahoo.com

Nov 18 '05 #2
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" <rg********@yahoo.com> wrote in message
news:15**************************@posting.google.c om...
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.
rg********@yahoo.com


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field...
0
by: Mats-Lennart Hansson | last post by:
Hi, I'm having a problem with event handlers. My code looks (a bit simplified) like this: public class Listener { CallerClass Call = new CallerClass(); string data= ""; public Listener()
1
by: Ron Vecchi | last post by:
Does a page either dump all control rendering html to the response buffer prior to the UnLoad event? Basically I want everything sent to the browser before I execute some possibly long sql...
8
by: Donald Xie | last post by:
Hi, I noticed an interesting effect when working with controls that are dynamically loaded. For instance, on a web form with a PlaceHolder control named ImageHolder, I dynamically add an image...
2
by: Shreyash Patel | last post by:
Hi I have a label on my WebPage. When Event A occurs on the Server I want to update the information in the label. So the Event A is not a client event but an event that occurs on the Server. So I...
6
by: MooreSmnith | last post by:
When I navigate to the next page using Response.Rediect("MyNextPage.aspx") current page Page_Load event is called. What I may wrongly understood is that post back will happen whenever there is any...
1
by: John Kotuby | last post by:
Hello again... I have tried using the SQLDatsource control as part of a user control that just conatins a Repeater and the SQLDatasource control which is designated as the Datsource for the...
3
by: pbd22 | last post by:
Hi. How do i output a well-formed XML document from inside an active event handler? I tried this in VB.NET (using a stringbuilder) and I kept getting a parser error. Has anybody run into this...
4
by: BigJohnT | last post by:
NeoPA, Thanks for getting back with me. Your understanding of my issue is correct. I wish to trigger some code (the printing of a separate report) when one report is sent to the printer and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.