For my newest windows-application I want to create an interface that is web-based using the web-browser control, and I want to make Ajax work on it. Since all the content will be loaded by the web-browser control itself I want to create a web-server that would work on a localhost port and serve my content to the web-browser when it accesses a special url, example:
How can I create a web-server that windows will route requests to? I just need to know about the right API/WinInet commands to start receiving the requests.
Fortunate for you, .NET comes with a pretty decent Web Server built into the framework.
Look at the HttpListener class.
It supports both synchronous and asynchronous modes:
This guy is great because it uses the native web server that is built into modern versions of Windows (XP SP2+ and Server 2003+).