Examine ASP.NET cache without rebuilding the web application
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 httpHandlerThe 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?
How to use the httpHandler?
The httpHandler section with the add element should be added to the Web.Config file