[Mono-list] ASP

Miguel de Icaza miguel@ximian.com
08 Feb 2002 15:24:17 -0500

>     I don't get you on "I can see if we can't commit this to Mono".
>     If you already have some ASP.Net server (to serve for test-bed) that would
> be great for us.

I would like to echo Gaurav's request.   It would be wonderful to have a
small set of classes that implement a Web Server, and that could be
extend to implement ASP.NET

Here is what I kind of thing we would like to have:

	System.WebServer namespace
		HttpServer class
			This class implements a web server, and should 		 	allow for all
kinds of constructors to control
			how information is dispatched.

			Most likely an abstract class, that virtualizes
			the actual data processing based on the URI.

We could handle the actual URI processing in various places, and maybe
it is worth considering a "broker" for URI processing.  So that you can
do things like "register" end points:

	`I want to listen to things in /Blah'
	`I want to handle all requests that end up in *.html'
	'I want to handle everything in /store' 

The ASP.NET processor can be implemented just by having a specialized
version of HttpServer that registers directories or extensions.

So for example, a "standard" server, could do things like:

static HttpServer CreateStockServer (...)
	HttpServer s = new HttpServer (..., 80);

	s.RegisterHandler ("*", new DefaultFileSystemHandler ());
	s.RegisterHandler ("/cgi-bin", new CgiBinHandler ());

	return s;

Then an ASP server, could be something like:

static HttpServer CreateASPServer ()
	HttpServer s = CreateStockServer ();

	s.RegisterHandler ("*.aspx", new AspDotNetHandler ());