I would like to write a C # application to handle my HTTP (including AJAX requests), and not go the way of PHP, PERL or ASP, since I just need to return some standard HTML, although, obviously, since I want CGI dynamically generated.
UPDATE: I do not suggest writing your own web server, but exe is hosted on a web server such as IIS or Apache. Also, I don’t want to learn and use ASP (I know that I can do it much faster, development time, in C # myself), and I just want the right W3C HTML to be sent back to the client.
Are there any good reasons not to do this?
I understand that every time an HTTP request is executed, exe needs to be loaded and run, but certainly Perl, ASP and PHP? Is there any way for exe to continue to work with all HTTP requests for a particular page? (although it seems to me that I'm just writing a mini HTTP server!)
Are there any good tutorials? I read this one, but it is a bit dated (2005): http://www.codeproject.com/KB/cs/cgi_csharp.aspx
UPDATE2: I don’t think speed would be a problem anyway (starting a small exe without a GUI is almost instantaneous), but if I wanted to be really efficient I could write a C # server, non-static page requests could have a tiny exe written in C, which sends a request to the C # server and returns a response. Couldn't I? :)