[Mono-list] Using xsp2 with mono

Joshua Tauberer jit at occams.info
Fri Sep 14 18:08:34 EDT 2007


The problem is probably that when using autohosting, directives in 
VirtualHosts are (iirc) pretty much ignored. Obviously, you can't have 
just one VirtualHost use ASP.NET 2.0 if more than one are all running 
through one mod-mono-server process, which is (iirc) how autohosting 
normally works.

If you put the MonoServerPath directive outside of vhosts (exactly the 
opposite of part of my first suggestion!), I'd expect it to work (and 
apply to all vhosts).

If you can't have it apply to all vhosts, for those vhosts that you want 
2.0, inside the vhost config, you will have to turn off autohosting and 
configure the application explicitly. At least, that's what I do for 
each of my vhosts anyway. See the wiki page 
(http://www.mono-project.com/Mod_mono) for more on that.

-- 
- Josh Tauberer

http://razor.occams.info

"Yields falsehood when preceded by its quotation!  Yields
falsehood when preceded by its quotation!" Achilles to
Tortoise (in "Gödel, Escher, Bach" by Douglas Hofstadter)


Jorge Bastos wrote:
> Ok i don't see a way to get it working for a certein virtualhost.
> If I change /usr/local/bin/mod-mono-server from:
> 
> #!/bin/sh
> exec /usr/local/bin/mono $MONO_OPTIONS
> "/usr/local/lib/mono/1.0/mod-mono-server
> .exe" "$@"
> 
> To 
> 
> #!/bin/sh
> exec /usr/local/bin/mono $MONO_OPTIONS
> "/usr/local/lib/mono/2.0/mod-mono-server2
> .exe" "$@"
> 
> And this way it works, but now I have all virtualhosts's using 2.0 profile.
> 
> Should it work just with:
> 
> MonoServerPath default /usr/local/bin/mod-mono-server2
> Or
> MonoServerPath /usr/local/bin/mod-mono-server2
> 
> ?
> 
> With this on the apache virtualhost conf, I get on error.log:
> 
> 
> [Fri Sep 14 22:39:09 2007] [error] Not running mod-mono-server.exe because
> no MonoApplications, MonoApplicationsConfigFile or MonoApplicationConfigDir
> specified.
> 
> 
> 
> -----Original Message-----
> From: mono-list-bounces at lists.ximian.com
> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Jorge Bastos
> Sent: sexta-feira, 14 de Setembro de 2007 13:54
> To: Mono-list at lists.ximian.com
> Subject: Re: [Mono-list] Using xsp2 with mono
> 
> Yap Path is correct.
> It the test i'm doing works even with that error.
> But without that directive in the vhost conf, apache doesn't throw any
> error.
> With the code below, and this directive, the browser still's show me this:
> 
> ---
> Compilation of Visual Basic code is not supported for v1.0/v1.1 assemblies,
> please use the v2.0 assemblies. - If this is a web application, use
> xsp2/mod_mono_server2 instead of xsp/mono_mono_server (see
> http://www.mono-project.com/Mod_mono#ASP.NET_2_apps_do_not_work). - If this
> is a desktop application, use gmcs to compile your application instead of
> mcs.
> ---
> 
> 
> Test code:
> 
> 
> ---
> <%@ Page Language="vb" %>
> <script  runat="server">
> Sub choose_image(Sender As Object, e As EventArgs)
>    image1.Src = select1.Value
> End Sub
> </script>
> 
> <html>
> <body>
> 
> <form runat="server">
> <select id="select1" runat="server">
>    <option value="smiley.gif">Smiley</option>
>    <option value="angry.gif">Angry</option>
>    <option
> value="http://spe.atdmt.com/b/NMMRTYRBMPRO/FY07_FF_SCE_JointLaunch_120x240_d
> ownload_now_0503.gif">Stickman</option>
> </select>
> <input type="submit" runat="server" value="Display image"
> OnServerClick="choose_image">
> <br /><br />
> <img id="image1" src="smiley.gif" runat="server" width="32" height="32" />
> </form>
> 
> </body>
> </html>
> ---
> 
> 
> 
> 
> -----Original Message-----
> From: Joshua Tauberer [mailto:jit at occams.info] 
> Sent: sexta-feira, 14 de Setembro de 2007 12:44
> To: Jorge Bastos
> Cc: Mono-list at lists.ximian.com
> Subject: Re: [Mono-list] Using xsp2 with mono
> 
> Jorge Bastos wrote:
>> Guys, to configure a virtualhost to use mod-mono-server2, it's enougth:
>>  
>> "MonoServerPath /usr/local/bin/mod-mono-server2" ?
>>  
>> When i add this and restart apache i get:
>>  
>> Restarting web server: apache2[Thu Sep 13 23:31:48 2007] [crit] (17)File 
>> exists: Failed to create shared memory segment for backend 'XXGLOBAL'
>> [Thu Sep 13 23:31:58 2007] [crit] (17)File exists: Failed to create 
>> shared memory segment for backend 'XXGLOBAL'
> 
> The error message is (should be) unrelated to the MonoServerPath 
> directive. (And provided the path is correct and you placed it in the 
> VirtualHost block, that directive should be enough, yes.)
> 



More information about the Mono-list mailing list