This project is read-only.

Basic HTTPListener

Jun 15, 2009 at 2:53 AM
Edited Jun 15, 2009 at 4:04 AM

I'm just trying to follow the first tutorial on the home page to create an HTTPListener.  In the tutorial the listener is declared with only 2 arguments, the ip address and port.  However in the documentation and my code, it's insisting I need an to create a class that implements the IHttpContextFactory interface.  Does anyone have an example of this? 

By the way, the downloadable documentation does not work regardless of where on the computer it's stored.  The online documentation works fine.


Richard Bailey

Ack!  Sorry for the double post.  It won't allow me to delete one :(

Jun 15, 2009 at 7:37 AM

HttpListener listener = HttpListener.Create(IPAddress.Any, 8081);


WinHelp has a bug, "#" cannot be in the path. i.e. Placing the help file in "C:\projects\c#\webserver" won't work, but placing it in "C:\projects\csharp\webserver" will. 

Jun 15, 2009 at 2:45 PM

I must have stared at that tutorial for a 2 hours and somehow managed to miss the "Create" command every time.  I knew I was doing something stupid.  Thanks for your help.