[MonoDevelop] Fwd: [Mono-list] MVC hosting

Abe Gillespie abe.gillespie at gmail.com
Mon May 9 12:12:18 EDT 2011


You may be right, it looks like when I built xsp it couldnt find the 4.0
cli.

I built mono from the git hub 2.10 branch not the ftp source, so I'll clean
up my usr/local and give the ftp source a shot instead~

Thanks for the help guys.

Cheers,
Doug.
On 09/05/2011 11:59 PM, "Abe Gillespie" <abe.gillespie at gmail.com> wrote:
> Did you install the latest XSP *and mod_mono from the sources link I
> mentioned earlier? Barring that, is it possible you set a configure option
> that prevented .Net 4.0 from being built / installed (and subsequently the
> configure script for XSP and / or mod_mono not detecting the dependencies
> necessary for xsp4 and / or mod-mono-server4)?
>
> -Abe
>
> On Mon, May 9, 2011 at 11:46 AM, Doug <douglas.linder at gmail.com> wrote:
>
>> Hrm.. this may be the core of my problem.
>>
>> On my server I only have mod-mono-server and mod-mono-server2; where did
>> you get mod-mono-server4 from?
>>
>> ~
>> Doug.
>>
>> On Mon, May 9, 2011 at 11:29 PM, Abe Gillespie <abe.gillespie at gmail.com
>wrote:
>>
>>> Robert - yep, that's soooo right. Sorry, I totally forgot that necessary
>>> step ... haven't used AutoConf in years.
>>>
>>> Doug - my conf looks like:
>>>
>>> <VirtualHost x.x.x.x:80>
>>> MonoAutoApplication disabled
>>> MonoServerPath "/usr/local/mono/2.10.2/bin/mod-mono-server4"
>>> MonoApplications "/:/var/www/html"
>>> <Location "/">
>>> Options FollowSymLinks
>>> Allow from all
>>> Order allow,deny
>>> SetHandler mono
>>> </Location>
>>> </VirtualHost>
>>>
>>> You can find much more info about it at
>>> http://www.mono-project.com/Mod_mono
>>>
>>> -Abe
>>>
>>> On Mon, May 9, 2011 at 11:17 AM, Robert Jordan <robertj at gmx.net> wrote:
>>>
>>>> On 09.05.2011 17:12, Doug wrote:
>>>> > May I ask what your apache config looks like?
>>>> >
>>>> > I don't have any problem serving a default.aspx page using mod_mono
>>>> (ie.
>>>> > default.aspx, with a default.aspx.cs code behind file), but like I
>>>> said,
>>>> > when I drop my Global.asax (and all the other mvc application files)
>>>> into
>>>> > the folder it just tries to serve them directly; ie. /Home/Test
returns
>>>> a
>>>> > 404, not the test view that I expect. /Global.asax returns an error.
>>>> >
>>>> > Ie. apache seems to be serving the actual files, and ignoring the
>>>> routing
>>>> > info that was defined in Global.asax.cs (now compiled and in
>>>> > bin/MvcHelloWorld.dll).
>>>>
>>>> You must disable AutoConfiguration:
>>>>
>>>>
>>>>
http://www.mono-project.com/AutoHosting#ASP.NET_MVC_and_AutoConfiguration
>>>>
>>>> http://www.mono-project.com/AutoHosting
>>>>
>>>> MonoAutoApplication disabled
>>>>
>>>> Robert
>>>>
>>>>
>>>> >
>>>> > ~
>>>> > Doug.
>>>> >
>>>> > On Mon, May 9, 2011 at 11:00 PM, Abe Gillespie<
abe.gillespie at gmail.com
>>>> >wrote:
>>>> >
>>>> >> I'm happily running an MVC2 site publicly on Mono / Apache. I assure
>>>> you
>>>> >> it works.
>>>> >>
>>>> >> Simply go through the setup steps for a WebForms site and then point
>>>> it at
>>>> >> your MVC site.
>>>> >>
>>>> >>
>>>> >> On Mon, May 9, 2011 at 10:13 AM, Doug<douglas.linder at gmail.com>
>>>> wrote:
>>>> >>
>>>> >>> There are indeed, many websites about running mvc via xsp2.
>>>> >>>
>>>> >>> Most of them suggest (as a first step) seeing the example in
>>>> >>> /usr/share/asp.net2-demos/ to see how to do this.
>>>> >>>
>>>> >>> *The problem is that these examples are not MVC applications. *
>>>> >>>
>>>> >>> They are just aspx files. And that seems to be all xsp can
handle...
>>>> >>>
>>>> >>> Indeed, if you jump into the source archive for xsp2, that's all
>>>> you'll
>>>> >>> find there too in the tests folder.
>>>> >>>
>>>> >>> Am I wrong? If someone can show me what I'm doing wrong I'm happy
to
>>>> admit
>>>> >>> that.
>>>> >>>
>>>> >>> No matter how hard I look at it though, mod_mono and xsp (ie. the
>>>> fast cgi
>>>> >>> impl) only seem to be able to handle code-behind files, not wsgi
>>>> style web
>>>> >>> apps.
>>>> >>>
>>>> >>> ~
>>>> >>> Doug.
>>>> >>>
>>>> >>>
>>>> >>> On Mon, May 9, 2011 at 9:59 PM, Abe Gillespie<
>>>> abe.gillespie at gmail.com>wrote:
>>>> >>>
>>>> >>>> Mono runs ASP.Net MVC apps just fine. The sources are here:
>>>> >>>>
>>>> >>>> http://ftp.novell.com/pub/mono/sources/
>>>> >>>>
>>>> >>>> XSP is at the very bottom. Note that you'll probably want mod_mono
>>>> as
>>>> >>>> well if you're running your site through Apache. Setup and running
>>>> XSP /
>>>> >>>> mod_mono is very Googlable; see what you can turn up.
>>>> >>>>
>>>> >>>> Note, that if you compiled MonoDevelop from source, there may be
>>>> some
>>>> >>>> extra steps involved to point MD at XSP and have it run / debug
your
>>>> MVC
>>>> >>>> sites properly. I don't know, I never compile MD from source.
>>>> >>>>
>>>> >>>> -Abe
>>>> >>>>
>>>> >>>> On Mon, May 9, 2011 at 4:00 AM, Doug<douglas.linder at gmail.com>
>>>> wrote:
>>>> >>>>
>>>> >>>>> Hi there,
>>>> >>>>>
>>>> >>>>> I'm posting this here in the hopes the mono-list is slightly more
>>>> >>>>> populated that the asp sublist.
>>>> >>>>>
>>>> >>>>> Basically the issue I have is this:
>>>> >>>>>
>>>> >>>>> I can compile an MVC 2.0 application under mono (great) but I
can't
>>>> >>>>> actually run it.
>>>> >>>>>
>>>> >>>>> xsp2 appears to only serve old-style apps where there is a 1-1
>>>> mapping
>>>> >>>>> between the file system and files, with each .aspx file having an
>>>> associated
>>>> >>>>> .aspx.cs code-behind file. This is not how MVC apps work.
>>>> >>>>>
>>>> >>>>> MVC apps should have their urls parsed and run according to the
>>>> routing
>>>> >>>>> information defined for that application; typically the
>>>> >>>>> /{controller}/{action} url is mapped to the function {action} in
>>>> the class
>>>> >>>>> Controller{controller} in the project. Under no circumstances
>>>> should the
>>>> >>>>> webserver randomly start trying to load aspx files from purely
from
>>>> the url
>>>> >>>>> pattern.
>>>> >>>>>
>>>> >>>>> I've seen a few vague posts about something called 'xsp4' that is
>>>> >>>>> somehow capable of doing this (for example this page mentions it
>>>> with regard
>>>> >>>>> to using razor:
>>>> >>>>>
>>>>
http://twistedcode.net/blog/post/2011/02/03/Orchard-begins-to-work-under-Mono.aspx
>>>> ),
>>>> >>>>> and is possibly packaged as part of the mono develop package, but
I
>>>> can't
>>>> >>>>> find any concrete information on where to actually get this.
>>>> >>>>>
>>>> >>>>> Also, if it's part of mono develop, that's not particularly
useful
>>>> for,
>>>> >>>>> for example, actually hosting a web app that uses MVC on a real
>>>> server.
>>>> >>>>>
>>>> >>>>> Is this part of the git repo somewhere?
>>>> >>>>>
>>>> >>>>> I build mono 2.10 from source on my server, but I couldn't find
the
>>>> >>>>> sources to xsp anywhere.
>>>> >>>>>
>>>> >>>>> help~
>>>> >>>>>
>>>> >>>>> cheers,
>>>> >>>>> Doug.
>>>> >>>>>
>>>> >>>>>
>>>> >>>>>
>>>> >>>>> _______________________________________________
>>>> >>>>> Mono-list maillist - Mono-list at lists.ximian.com
>>>> >>>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>>> >>>>>
>>>> >>>>>
>>>> >>>>
>>>> >>>
>>>> >>> _______________________________________________
>>>> >>> Mono-list maillist - Mono-list at lists.ximian.com
>>>> >>> http://lists.ximian.com/mailman/listinfo/mono-list
>>>> >>>
>>>> >>>
>>>> >>
>>>> >
>>>> >
>>>> >
>>>> > _______________________________________________
>>>> > Mono-list maillist - Mono-list at lists.ximian.com
>>>> > http://lists.ximian.com/mailman/listinfo/mono-list
>>>>
>>>>
>>>> _______________________________________________
>>>> Mono-list maillist - Mono-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>>>
>>>
>>>
>>> _______________________________________________
>>> Mono-list maillist - Mono-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-list
>>>
>>>
>>
>> _______________________________________________
>> Mono-list maillist - Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20110509/84e81eeb/attachment-0001.html 


More information about the Monodevelop-list mailing list