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.

Http module

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.

Http Factory

With the http factory you can inject your own types into the framework and replace the default ones.

Read more

Resource handling.

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.


Last edited Mar 20, 2010 at 4:28 PM by jgauffin, version 2

Comments

epicus Aug 9, 2011 at 5:43 AM 
Well. when i try to make a error page using vb.net, im adding a handler"

AddHandler listener.ErrorPageRequested, AddressOf OnError

and then the Sub OnError(sender ...)

However i always get the error that it is not compatible.