Sponsored By Aspose - File Format APIs for .NET

Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!

HttpListener in .NET

I have heard at least 20 different presentations inform me that one of the super awesome benefits of using a HttpListener in .NET is that it goes through http.sys which will allow you to have kernel mode caching inside of http.sys. They then explain why this is so much better because it doesn’t require a transition to user mode and blah blah blah.

Guess what they lied. In actually measuring this possible performance gain I found it was non-existent. After some poking through reference sources I came across:

line 525
asyncResult==null ? null : asyncResult.m_pOverlapped,
null );
Argument 5 is the CACHE_POLICY. It is set to null which means no caching.
The bigger question is why on earth would microsoft not allow you to use the http caching you pay a big complexity penalty to have access to?
This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>