Since Windows XP Service Pack 2, there's been a buddy living in the system called Http.sys. IIS and SQL Server both interact with this kernel-mode HTTP listener to receive and response to HTTP requests.
Within the .NET framework, you can build your own application to interact with HTTP requests using the HttpListener class, which is simply managed code built over the Http.sys API.
The code to work with the HttpListener class is quite simple, as illustrated with this example:
System.Net.HttpListener newHttpListener = new System.Net.HttpListener();
System.Net.HttpListenerContext context = newHttpListener.GetContext();
byte byteArr = System.Text.ASCIIEncoding.ASCII.GetBytes("Hello World!");
context.Response.OutputStream.Write(byteArr, 0, byteArr.Length);
After instantiation of the HttpListener, we specify the prefix with which we want to receive requests. To process requests originating locally, you can specify a URL with localhost. To receive all requests, you can instead use an asterisk (*). The port number can be specified if you want to listen to requests on a non-standard port (the standard port is 80). The application starts listening for requests on calling GetContent, which is a synchronous blocking method (you can use the asynchronous method instead, if that's what you need). We then examing the incoming request - I left out this step for simplicity - and send out the response by writing to the output stream of the Response object.
With the HttpListener class, handling HTTP requests independent of IIS is a no-brainer. You don't have to work with sockets or process HTTP protocol messages - all that heavy lifting is already done for you by the HttpListener class leaving you to focus on what really matters, the idea that will build a better tomorrow.