The attached project contains a demonstration program using Gossamer, a web server in a UserControl.
Adding the control to your projects is simple. To use it just drop an instance onto a Form, set a few properties, and optionally write two event handlers. Then call StartListening and Gossamer does the rest.
Gossamer handles:
Static GET requests.
Dynamic GET requests.
Static HEAD requests.
Dynamic POST requests.
Dynamic requests are processed by raising an event back to Gossamer's container Form, where your logic processes the request and returns results.
A tiny sample web site is included that the example program works with to show how to use Gossamer. It has an example of handling dynamic requests as well as static ones.
It would be easy to repackage Gossamer as an OCX if desired.
Gossamer is probably not fully debugged, having been thrown together in two days. But I believe I have gotten most of the glaring bugs out. You can easily add more logic to extend its capabilities as well as tweak things and fix problems.
Testing the sample is easy. Just unzip the project into a folder, open GossDemo1.vbp, run the program and click its Start button. Then point a browser to localhost:8080 to view the example web site.