This example demonstrates one of many possible scenarios when a client should be notified of the progress of a server process. The sample includes a class declaration of a custom HttpHandler; the latter processes the simplest request from the client and returns information that can be restored and used to display current progress, without refreshing the whole page. The other defined class emulates long-time processing, which starts with a standalone thread and is executed in the background. This is an advantage because a callback is performed on the server side quickly if a client requests a new process.
Note that any custom HttpHandler should be registered via the IIS Console Manager or manually through the web.config file. More details are available here: How to register HTTP Handlers.
Please refer to the following links to know more:
Creating an Asynchronous HTTP Handler
Creating a Synchronous HTTP Handler
This example extends the following one: How to display progress information about server-side callback processing.
See also:
How to track progress of server side processing on the client side (using HttpModule)
How to track progress of server side processing on the client side (using WebMethods)