views:

178

answers:

6

We just purchased a webcam to visually monitor some equipment remotely. Currently we are monitoring thorough the intranet only. The software that came with the webcam is installed on the computer that is physically connected to the webcam. From anywhere on the intranet, I can type that computer's address in the browser, for ex., http://192.168.1.99, and I get a browser page that shows the live video plus ways to pan and zoom the webcam. But there is no web server installed in the web-cam computer! It is running Windows XP and I wondered if IIS could be running and it is not.

My question is what technology could they be using to serve up http pages without IIS? Could they be using a mini-web server they rolled up on their own? How can I find out?

Now, if I want to write my own application that serves web pages through the internet, an application that the user could run without having to install a web server, how would I do it? What technology / .NET classes should I use?

Thanks and this is a great site!

+2  A: 

If you want to roll your own HTTP server, the .NET HttpListener class makes it really easy. It will wrap all details around requests and responses, and you will only have to worry about serving the content.

You could also implement it yourself using sockets (or one of the abstractions .NET provides, such as the TcpClient class). Then you would have to implement the details of the HTTP protocol yourself.

driis
A: 

It's pretty easy to write a very basic web server. .NET includes HttpListener but you could do it from scratch without too many problems. HTTP isn't the most complicated protocol in the world if you know what you're serving and don't need too many bells and whistles.

As for what your webcam is using, you could install a browser plugin to show you all the headers, or just connect programmatically and look at the headers. There's nothing to say it will be accurate of course, but it may give some clues.

Jon Skeet
A: 

Take a look at HTTPListener and the Cassini Web Server.

dpp
A: 

We have about a half dozen of the Axis web cameras and if you FTP into them, they appear to just be running a really stripped down version of Linux. I don't know which webserver ours are running but there's a ton of really lightweight web servers out there for just about any platform. Here's a link.

http://en.wikipedia.org/wiki/Tiny_web_servers

Dana
A: 

With WCF, it takes about 20 minutes to roll your own webserver once you're comfortable with the underlying technology. Just search google for WCF and WebHttpBehavior.

Steve
+1  A: 

By the way, if you're still interested in what technology they're using, try:

netstat -ano|find ":80 "|find /i "listening"

This will give you the ID of the process that's serving the pages. Then use Task Manager's processes tab (having added the PID column) to find the name of the process. Or use Process Explorer, which will give you more information about the program.

Mark