Tutorial :Mono 2.4, AutoHosting and MVC



Question:

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.


Solution:1

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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »