A first chance exception of type 'HttpServer.Exceptions.BadRequestException' occurred in HttpServer.dll

Mar 4, 2009 at 12:08 AM
Hi

Not sure what I have done wrong - downloaded version 1.00 stable (debug build)

Used the code from tutorial #1 in a windows forms app and if I try to connect to it from IE/Safari etc it writes the following to the OUTPUT window in Visual Studio and my OnRequest event never fires.

A first chance exception of type 'HttpServer.Exceptions.BadRequestException' occurred in HttpServer.dll

Every request causes this problem.

I added a handler for

 

 

void _listener_ExceptionThrown(object source, Exception exception)

 

{

 

}

This never gets called...

 

_listener =

HttpListener.Create(System.Net.IPAddress.Any, 8099);

 

_listener.RequestReceived += OnRequest;

_listener.ExceptionThrown +=

new ExceptionHandler(_listener_ExceptionThrown);

 

_listener.Start(5);

Any ideas?

Chris

Coordinator
Mar 4, 2009 at 7:19 AM
I want to see the request or get more details of the exception (click on details when the exception is thrown in vstudio).