[Mono-devel-list] mod_mono/xsp and external javascript files

Phillip Hitchcock phitchcock at xtra.co.nz
Thu Dec 16 18:24:12 EST 2004


all files under the document root are owned by the apache user so it 
shouldn't be a permissions issue.

nothing gets written to the error log about it only a line in the access log 
showing the request for the js file, the 500 return, and the page that 
requested it.

i just found i do get more information if i directly request the file in the 
web browser, the browser comes back with the 500 error but it also says 
"Failed to get session object".
Now it does this on requests for .js and .html files straight from the web 
browser, xsp does exactly the same thing, is xsp suspose to be able to serve 
up html files?

i also just found this with the new information
http://lists.ximian.com/archives/public/mono-list/2004-September/023407.html
is this true?  does mod_mono and xsp only handle .NET files?

changing the
setHandler mono
to
AddHandler mono .aspx.dll ......

fixes it and all is good... mostly.

the only problem i do have with this is that i am using a httpModule to 
control access to the application as well as a few otherthings.  This means 
that anything not handled by mono won't be intercepted and interigated for 
authentication.


----- Original Message ----- 
From: "Simon Bain" <sibain at tendotzero.com>
To: "Phillip Hitchcock" <phitchcock at xtra.co.nz>
Sent: Friday, December 17, 2004 2:04 AM
Subject: Re: [Mono-devel-list] mod_mono/xsp and external javascript files


> Phillip hi.
>
> I use js files in mod_mono with no problems inside a sub directory of my
> mono apps directory.
>
> The 500 error does it give any further info in the apache error log. I am
> thinking of access rights to the directory/file by Apache/xsp when sending
> the files out.
>
> JavaScripts are not generally handled by the web server but by the browser
> in the page directly. So if the server is unable to include them in the
> file and has an access error on trying a 500 will be thrown.
>
> you can change the setHandler Mono to
> AddHandler mono .aspx .dll .ascx .ashx .asax .config .asmx
> to only handle specific files.
>
>
> Cheers
> Simon
> -- 
> Simon Bain
> TENdotZERO
> ----------
> Tel:    0845 056 3377
>        44 1234 359090
> Mobile: 44 (0)7793 769 846
>
> <quote who="Phillip Hitchcock">
>> so i should be able to have .js files under the monoapplication path?
>>
>> the apache document root is /srv/www/htdocs/
>>
>> i have a mono application diffined at
>>
>> Alias /Btools/ /srv/www/htdocs/Btools
>> MonoApplications "/Btools:/srv/www/htdocs/BTools/"
>>
>> <Directory /srv/www/htdocs/BTools>
>>     setHandler Mono
>>     ....
>> </Directory>
>>
>> if i have the js files at
>> /srv/www/htdocs/BTools/javascript/foo.js
>>
>> i get 500 returns in the apache access_log on the request for the js 
>> file.
>>
>> if i have it outside the monoapplication path it works fine...
>>
>>
>> the setHandler mono under the directory tag bothers me...  do i need to
>> alter this somehow to make it only handle specific files?  and let apache
>> deal with the rest?
>>
>>
>> any help would be greatly appreciated
>>
>> thanks
>>
>>
>>
>> ----- Original Message -----
>> From: "Gonzalo Paniagua Javier" <gonzalo at ximian.com>
>> To: "Mono Development" <mono-devel-list at lists.ximian.com>
>> Sent: Friday, December 17, 2004 1:01 AM
>> Subject: Re: [Mono-devel-list] mod_mono/xsp and external javascript files
>>
>>
>>> >On Thu, 2004-12-16 at 17:29 +1300, Phillip Hitchcock wrote:
>>>>Hi all
>>>
>>>>just starting out with mono and come accross a funny problem, niether
>>>>mod_mono or xsp seem to serve up external javascript files.  apache2
>>>>log reports a 500 return on the request.
>>>
>>>>i find this funny because a while back i tried css files and it worked
>>>>fine.
>>>
>>>>i can get ti to work by moving the javascript file out of the
>>>>application path so apache deals with it... but really i having it all
>>>>together.
>>>
>>> Errrr. Of course it works. Javascript files, css files, whatever...
>>> Nothing special is done with them. They are handled by the
>>> StaticFileHandler just like any other non-aspx files.
>>>
>>> -Gonzalo
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
> 





More information about the Mono-devel-list mailing list