Get last-modified header from response in ASP.NET(madskristensen.net)

submitted by mosessaurmosessaur(5424) 3 years ago

I’ve been working lately with some ASP.NET performance optimization automation HTTP modules. In one of them I needed to know if the last-modified header had been set through the Response.Cache.SetLastModified(DateTime) method. For some reason, there is no API available anywhere within the BCL to retrieve the last modified date of a response – you can only set it. Since the module wouldn’t work without a way to read the last modified date of the response, I had to use Reflector to figure out how to pull the information out using reflection. The result became a simple little method to retrieve the date

add a comment |category: |Views: 14

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story