This project is read-only.


  1. I ran the code, but got "Access Denied" at HttpListener.Start(). Why was that?

    The problem was caused by some security measures in .NET Networking: wildcard path was used (such as http://+:nnnn); usually only path of localhost is allowed by default. There are two workarounds: to run code in elevation mode as admin, or register the wildcard path to system and it is OK to run code under normal provilledge.

    To register wildcard path, you need to run following command as admin (of course replace 9876 with whatever you are going to use as the proxy port)

    c:\>netsh http add urlacl url=http://+:9876/ user=\Everyone

  2. What is the typical use model of this mini proxy?

    Mini proxy was inspired by a real life problem. A colleage of mine wanted to test a black-boxed component which has sort of complicated logic to amend Http headers before sending out HTTP request. It is known which HttpWebRequest object is in use, but when, and how, various Http amendaments are done are sealed behind the API called. This particular problem eventually led to this mini proxy project.

    Mini proxy is a light-weighted in-process HTTP proxy. It seems to have some potential good usages towards isolation and testing of HTTP based system. Taken aside any proctical uses, isn't it fun to intercept bytes on wire without heavy duty mechanisms like Fiddler or netmon or wireshark?

  3. ...

Last edited Nov 10, 2011 at 1:51 AM by hwche, version 1


No comments yet.