[Mono-aspnet-list] mvc hosting & xsp2 errors?

Daniel J. Summers daniel.summers.2415 at gmail.com
Mon May 9 08:48:49 EDT 2011

On Mon, May 9, 2011 at 12:12 AM, Doug <douglas.linder at gmail.com> wrote:

> The problem seems to be that xsp2 is simply serving files.
> Ie. If you request localhost:8080/default.aspx, it tries to load and run
> default.aspx in the current directory.
> This is completely the incorrect behaviour for an MVC application; the
> routing should be loaded from the class that extends
> System.Web.HttpApplication, typically in Global.asax.cs.
> I can't find any information about how to actually host an mvc application;
> everything seems to assume we're still working in the asp world where url ->
> file is a 1 to 1 relationship. :/

Do you have a route defined that should intercept "default.aspx"?  Most MVC
URLs are the form of /controller/[action = "Index"]/[id (optional)] (e.g.,
"Person/Edit/13", where PersonController.cs has a public ActionResult
Edit(int id) method).  If no defined route matches, it will try to serve the
file; that's the "route" that you need to serve straight images, for

I'm not doing MVC 2, but I've got an MVC 3 application (and am working on
several others) running successfully with Mono 2.10.1.  The only thing I had
to do special, bringing the app from VS2010 to Mono, was copy the DLLs
required for MVC 3, as they aren't part of Mono yet.  I keep meaning to
write a blog post about the steps it took; this e-mail is another reminder
for me.  :)

*Daniel J. Summers*
*Owner, DJS Consulting*
E-mail <daniel.summers.2415 at gmail.com> • Website <http://djs-consulting.com>
 • Support <http://support.djs-consulting.com> • Tech

GEEKCODE 3.12 GCS/IT d s-:+ a C++ P--- L++ E--- W++ N++ o? K- w !O M--
V PS+ PE++ Y? PGP- t+ 5? X+ R* tv b+ DI++ D+ G- e<++ h---- r+++ y++++
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-aspnet-list/attachments/20110509/bdc7aee7/attachment.html 

More information about the Mono-aspnet-list mailing list