Share via


Troubleshooting Exceptions: System.Net.HttpListenerException 

An HttpListenerException is thrown when an error occurs processing a Hypertext Transfer Protocol request.

Associated Tips

  • Make sure you are not attempting to register a URI prefix that is already registered.
    If the URI prefix is already registered, this exception will occur.
  • Make sure your HTTP request is valid.
    This exception is thrown by the HttpListener class and its associated classes when an error occurs during the initialization of the HttpListener or while creating or sending a response to an HTTP request.
  • If you are using the HttpListenerPrefixCollection.Add method, make sure the uriPrefix has not been already added.
    This exception will be thrown if another HttpListener has already added the prefix uriPrefix.

See Also

Tasks

How to: Find Out More About an Exception with the Exception Assistant

Reference

HttpListenerException
HttpListener
HttpListenerPrefixCollection