[Mono-list] apache/mod_mono and handlers without extensions?

Christian Hobelsberger hobi1972 at gmail.com
Mon Sep 8 08:32:40 EDT 2008


thank you for your quick response ...  but it seems not to work. :(

I have this in my apache config:

<VirtualHost *>

        DocumentRoot /www
        ServerName testserver

        MonoAutoRestartMode Requests
        MonoAutoRestartRequests 10

        MonoPath "/opt/mono-1.9.1"
        MonoServerPath /opt/mono-1.9.1/bin/mod-mono-server2

        MonoAutoApplication enabled

        <Location /v1.10/SimpleTest>
                SetHandler mono
        </Location>

</VirtualHost>

Then i try to call "http://127.0.0.1/v1.10/SimpleTest" (the above
VirtualHost is the default, so this should work without name, too).

in the error log i get:
[error] [client 192.168.1.146] File does not exist: /www/v1.10/SimpleTest

If i call "http://127.0.0.1/v1.10/SimpleTest.ashx" i get the page, the log
says:
192.168.1.146 - - [08/Sep/2008:14:28:50 +0200] "GET /v1.10/SimpleTest.ashx
HTTP/1.1" 200 42

So just to be sure, there is no subfolder "SimpleTest" ... it's all in the
same folder "v1.10" ... i just want to instruct mod-mono-server to handle
"SimpleTest" with a certain handler. This works using xsp when i have a
handler in the web.config ... but this seems not to work using mod_mono ...

CHH

On Mon, Sep 8, 2008 at 2:08 PM, Joshua Tauberer <jit at occams.info> wrote:

> Christian Hobelsberger wrote:
>
>> i have troubles to properly configure mod_mono ...
>>
>> I'd like to be able to process ashx files without the need to use their
>> extension.
>> I have e.g. a "SimpleTest.ashx" file, which should be accessible using
>> only "SimpleTest". I have created an entry in my Web.config which looks like
>> this:
>> ...
>>  <add verb ="*" path ="*/SimpleTest" type ="SimpleTest, SimpleTest"/>
>> ...
>> calling "http://localhost/SimpleTest.ashx" works without problems, but "
>> http://localhost/SimpleTest" only gives 404 - Not found ...
>> If i try XSP2, this works without problems, so it seems to be mod_mono
>> configuration issue?!
>>
>> Does this not work with mod_mono? Has anyone a working configurarion?
>>
>
> Hi,
>
> You need to tell Apache that that URL is to be processed with mod_mono,
> with e.g.:
>
> <Location /SimpleTest>
>    SetHandler mono
> </Location>
>
> You can also use something like to configure this by extension:
> AddHandler mono .aspx .ashx ...
>
> --
> - Josh Tauberer
>
> http://razor.occams.info
>
> "Yields falsehood when preceded by its quotation!  Yields
> falsehood when preceded by its quotation!" Achilles to
> Tortoise (in "Godel, Escher, Bach" by Douglas Hofstadter)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20080908/b1de11f5/attachment-0001.html 


More information about the Mono-list mailing list