Cassini web server
Cassini is an open-source - Web server (under Ms-PL ) from Microsoft . The project is intended as a technological study to show how easy it is to integrate ASP.NET support for your own projects.
construction
The source code of the web server is written in C # and consists of nine source code files. The important functions and classes are in 4 of the 9 files:
- Server.cs: Class for defining a web server with functions for starting and stopping, forwards the work to the Host class.
- Host.cs: Management of the connections with the clients , forwards incoming requests to the connection class
- Connection.cs: Abstract representation of a request, forwards the work to the Request class.
- Request.cs: Processes the requests in cooperation with the .NET class HTTP Runtime .
Features and Limitations
Cassini supports HTTP / 1.1 , many of the standard MIME types, and of course ASP.NET. Since the server is open source, the source code can be changed by anyone. This means that certain lines can be commented out so that the server can also be accessed from the network (no longer only locally).
Since the web server is only intended for demonstration purposes, it is kept quite simple and does not handle many of the usual web server functions . Cassini only allows one web application per port and only one port per instance . In addition, it does not support secure connections via SSL and does not have the option of authentication ( Basic , Digest etc.). As mentioned above, the standard restriction to local requests can be removed by commenting out a few lines in the code.
literature
- Christian Wenz: dotnetpro 7/2004, p. 94