Win 7 and VS2010 B2. I am trying to write a minimal web server using the built-in HttpListener
. However, I keep getting an AccessDenied exception. Here is the code:
int Run(string[] args) {
_server = new HttpListener();
_server.Prefixes.Add("http://*:9669/");
_server.Start();
Console.WriteLine("Server bound to: {0}", _server.Prefixes.First());
_server.BeginGetContext(HandleContext, null);
}
I could understand the need to run as administrator if I was binding to a system port, but I don't see why my binding to 9669 should require special permissions.
Any ideas?