Examine ASP.NET cache without rebuilding the web application

Understand the use of httpHandler and modifications required in Web.Config to add httpHandler

The Problem:

The client is using a web service, which writes a value to the ASP.NET cache. The cache value gets reset and needs to be examined.

The Solution:

Instead of modifying the web Service code to log the cache values and recompile it, a httpHandler can be used to examine the cache.

What is an httpHandler?

When a request is made to a Web Application, it is handled by the httpHandler code. The request for aspx pages is handled by the page handler and custom httpHandlers can be used to show required output in the browser.

Thus a cache displaying code can be used as a custom httpHandler. The cache examining code could be in a seperate dll and it could be included in our application to examine the cache by using it as an httpHandler

How to use the httpHandler?

The httpHandler section with the add element should be added to the Web.Config file

Related Articles

Usage of HttpHandler

HttpHandler can be very handy in scenario when you don't require complete page cycle.


What is httphandler and why it is important

More articles: HttpHandler Caching Web.config file


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: