Extending the webserver
The webserver can be extended in a numerous of ways thanks to it modular design. The following approaches can be used both for the plain http server and the mvc server.
A http module can be used to handle certain requests and generate custom responses.
A typical usage of a HTTP module would be to create a HTTP proxy or a streaming server.
All you need to do is to create a class and implement IModule interface, then call Add in the server object to add your module.
With the http factory you can inject your own types into the framework and replace the default ones.
Want to be able to use files that are not on the disk or assembly embedded resources? Create your own type and implement the IResourceLoader interface.
Custom error pages.
Want to provide custom error pages? Hook the Server.ErrorPageRequested event.