views:

1021

answers:

4

There is a simple http server API that allow you do some simple stuff quickly, without any addition dependency/installation required.

Are there any similar API/library in .NET WITHOUT IIS?

For example, I am a small window service running, I'd like to add a simple stupid web interface to allow local/remote control/monitoring.

A: 

A quick Google gave me many examples of this, such as Creating your own web server using C#.

Note, that is a very old article, there are probably more concise ways to do this now.

Edit: another nice example here.

RedFilter
+4  A: 

HttpListener hooks into HTTP.SYS even without IIS, I believe.

You'll need to add priveleges to the service account, though - nstsh on vista, httpcfg on xp ("how" covered here).

Marc Gravell
Thanks. But they have note on the MSDN website: You will get a PlatformNotSupportedException before WinXP SP2.
Dennis Cheung
Then you'll probably have to find a sockets-based library... oh well.
Marc Gravell
+1  A: 

Take a look at this project on codeplex: http://www.codeplex.com/webserver

David Tischler
+5  A: 

In addition to the previously mentioned webserver project on codeplex, another simple http server API option is Kayak. Kayak appears to be in an early development stage. It hasn't reached 1.0 yet.

UPDATE: I noticed that my original link to Kayak broke recently. The main website for Kayak has moved to http://kayakhttp.com/ but the code is hosted on Google code: http://code.google.com/p/kayak/.

dthrasher