Why not use .net's HttpListener?

Topics: faq
Jul 14, 2008 at 4:01 PM
I do not want to choose between running in administrator mode or using a external tool (httpcfg or whatever it was called) in administrator mode. (more info can be found here: [url:http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=93940])

Jul 27, 2008 at 5:19 PM
Microsoft's version of HttpListener (under System.Net namespace) uses WinHttp API for parsing HTTP. WinHttp in turn uses http.sys kernel mode driver.  This paired with http.sys kernel mode caching support means that you will have a hard time outperforming Microsoft's implementation due much less kernel/user mode transitions.
Did you do performance comparsion, for example, against Casini open source web server which uses Microsoft's HttpListener?  I'd be curious about the results.
Jul 28, 2008 at 7:08 AM
The .Net http listener will of course be faster, no matter what. But that kind of performance have never been an issue to me. As I stated above, I did an own listener since .Net's http listener needs administrator privileges every time a new url should be handled.

I have not optimized the framework in any way for speed. I will do this later on if I need it.