[Mono-dev] mod_mono Configuration Question
Gonzalo Paniagua Javier
gonzalo at ximian.com
Wed Jan 25 11:18:13 EST 2006
On Wed, 2006-01-25 at 08:57 -0600, stephen at covidimus.net wrote:
> There doesn.t seem to be an ASP-on-mono or webforms list at http://mono-project.com/Mailing_Lists, so I.m sending this to the devel list (to which I was already subscribed). Please redirect me if there.s a more appropriate place to ask the question.
>
>
>
> I.m running mono 1.1.10 w/ Apache 2 and mod_mono. When I try to
> directly access a .cs file contained in that directory, I get a 403,
> which is what I expect. I want to turn that behavior off for a
> particular subdirectory in that tree, though (an examples directory).
> Adding an .htaccess in that directory with .RemoveHandler .cs. didn.t
> work. I put some syntax errors in that .htaccess file and still got
> the 403 (rather than an expected 500), so my guess is that mod_mono is
> handling everything below that directory and Apache never sees
> the .htaccess. So, how do I either get that directory back into
> Apache.s hands, or alternatively, tell mod_mono to serve .cs files
> from that directory?
I would remove the handler for .cs files and add a new one (which would
be the StaticFileHandler) in a web.config file for the directory on
which you want to enable .cs files download. I haven't tested this, but
the web.config should be something like:
<configuration>
<system.web>
<httpHandlers>
<remove verb="*" path="*.cs" />
<add verb="GET" path="*.cs" type="System.Web.StaticFileHandler,
System.Web, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</httpHandlers>
</system.web>
</configuration>
-Gonzalo
More information about the Mono-devel-list
mailing list