This example demonstrates an alternative way of how to track server-side processing. In this example, a custom HttpModule is used instead of HttpHandler as demonstrated in the How to track progress of server side processing on the client side (using HttpHandler) example. The use of the HttpModule has multiple advantages, and here are some of them:
- The module will be called earlier than the handler;
- At this stage, a user can close the predefined request from the client.
In contrast to the previous example where a session object is used to store a progress value, a simple static class is defined. Note this class has a global scope and should be made thread-safe.
For more information about the difference between the use of HttpModule and HttpHandler, follow this article: HTTP Handlers and HTTP Modules Overview
This example extends the following one: How to display progress information about server-side callback processing
You can find more information on HttpModule basic concepts here: Walkthrough: Creating and Registering a Custom HTTP Module
See Also:
How to track progress of server side processing on the client side (using WebMethods)
Question Comments
Added By: Les Brinkworth at: 6/21/2013 1:33:41 PM
Perhaps to help others who are following this example:
The missing piece of the code puzzle is the registration of the HTTPModule in the WEB.Config file:
<configuration>
<system.webServer>
<httpModules>
<add type="CustomModule" name="CustomModule" />
</httpModules>
</system.webServer>
</configuration>
Without that this example doesn't work