C# Applications as CGIs RRS feed

  • Question

  • User-547770367 posted
    Has anyone compiled a C# application and used it as a CGI for Apache on Win32 or IIS 5/6? As long as I write the application to send the "Content-Type: text/html\n\n" HTTP header, it works very well. This method is also faster than ASP.NET, since it's already compiled into MSIL. AFAIK, you can't use Session, Request, and Response unless it utilizes ASP.NET. Is there a better way to use pre-compiled .NET applications on web servers? Example C# CGI: using System; public class myCGI { public static void Main(string[] args) { Console.Write("Content-Type: text/html\n\n"); Console.Write("Hello World!"); } }
    Friday, June 18, 2004 12:33 PM

All replies

  • User-967169866 posted
    ... you're joking right? IIS should allow you to execute executables over the http pipe. Also, the asp.net application timeout and recompile scenario is adjustable to reduce the pre-compile issue if that's such a problem.
    Friday, June 18, 2004 4:11 PM