[Mono-list] Mono Apache2 and cshtml files

Gonzalo Paniagua Javier gonzalo.mono at gmail.com
Thu Jan 19 01:29:26 UTC 2012


On Wed, Jan 18, 2012 at 7:33 PM, Martin J. Thwaites
<martin at my2cents.co.uk> wrote:
> Hi all,
>
> I've got a slight problem that I'm hoping that someone can point me in the
> direction of a solution for...
>
> I'm trying to get blogengine.net up and running on a server, and it works
> for the most part, but there's a slight problem that a particular page is
> linked to as "default.cshtml".  This means that apache is thinking that it's
> a file to download.  I've tried adding it using the "AddType
> application/x-asp-net .cshtml" in mod_mono.conf, mod_mono_auto.conf and in
> the site vhost file as well.
>
> Am I missing something here? I'm not a linux/mono guru, but the above seems
> to make sense, but it's not working.

If you use SetHandler instead of AddHandler, mod_mono will take over
handling all the files and the problem won't happen.
See the manual page for mod_mono and search for SetHandler.

-Gonzalo


More information about the Mono-list mailing list