Can mod_mono's AutoHosting be modified to support ASP.NET? ATM it doesn't really work: Link. / works, but the runtime ignores Global.asax altogether and doesn't follow the routing conventions.
The purpose of AutoHosting in Mono is to make it as easy as possible for someone to quickly get an ASP.NET site hosted on Mono by reducing the amount of effort needed to configure the server; however, it does so by hosting file types which have been configured as ASP.NET file types. You can find the file extensions it is configured to host in the mod_mono.conf file.
Since MVC Routing avoids using file extensions, it is probably just not a good solution for MVC hosting. That said, if you absolutely must use AutoHosting, you could add the following to your mod_mono.conf file to set all content for the server to be served as x-asp-net content: ForceType application/x-asp-net
Doing so has broader implications, so I can't say I'd recommend it.
If you have the ability to change the configuration for the Apache server, you would probably get better results from just configuring mod_mono for your application.
来源:https://stackoverflow.com/questions/699487/mono-2-4-autohosting-and-mvc