Search code examples
.netwindowscompact-frameworkwindows-ceisapi

Windows CE 5.0 HTTPD <-> .NET Application


I'm what is the most practical way of coupling a HTTPD Web server of a Windows CE 5.0 Device to a .NET application that runs on the same Windows CE device?

My first idea was to build an ISAPI extension that would forward incoming http requests to a .NET application. Not sure how to do it! May be shared memory, COM, TCP/IP Sockets?

Another way could be, implementing a standalone HTTP server within the .NET application itself and avoid using the HTTPD.

Any experience or ideas?

Thanks Chris


Solution

  • In my opinion, based on trying to use the built-in HTTPD server in the past, is that the built-in server absolutely sucks for trying to do anything useful. It's a major headache to debug anything and interop with any device hardware/system is painful.

    Since there is no EE Hosting support in the CF, the web server cannot load managed assemblies (from ISAPI or anything else). That means your managed code has to be in a separate process and to communicate you have to use IPC - something like a P2PMessageQueue, MemoryMappedFile, socket, etc.

    Writing your own HTTPD server is also an option, but it's not a trivial task. It sounds simple, but there's a lot involved once you dive into it. I know that because we made that decision several years ago on a project, and the server we ended up creating supported a subset of ASP.NET and we actually turned it into a commercial product because a) it was really useful and b) becasue it took a lot of work to actually write. It does, however, give that benefit of hosting managed code and being able to debug in Studio instead of printf as a managed developer expects.