views:

515

answers:

2

Can mod_mono's AutoHosting be modified to support ASP.NET? ATM it doesn't really work: Link. / works, but the runtime ignores Global.asax altogether and doesn't follow the routing conventions.

+1  A: 

The purpose of AutoHosting in Mono is to make it as easy as possible for someone to quickly get an ASP.NET site hosted on Mono by reducing the amount of effort needed to configure the server; however, it does so by hosting file types which have been configured as ASP.NET file types. You can find the file extensions it is configured to host in the mod_mono.conf file.

Since MVC Routing avoids using file extensions, it is probably just not a good solution for MVC hosting. That said, if you absolutely must use AutoHosting, you could add the following to your mod_mono.conf file to set all content for the server to be served as x-asp-net content: ForceType application/x-asp-net

Doing so has broader implications, so I can't say I'd recommend it.

If you have the ability to change the configuration for the Apache server, you would probably get better results from just configuring mod_mono for your application.

Joseph Hill
Already tried configuring mod_mono; however, I get the dreaded "dashboard error" that so many have received (according to Google), but no one has actually documented.
hb
Regarding the "dashboard error", see:https://bugzilla.novell.com/show_bug.cgi?id=476289"This message can be ignored. It's a side effect of the way Apache starts up and it won't affect the way mod_mono works."If your site isn't working, you should check your apache error logs for other messages.
Joseph Hill
+1  A: 

Hi, This is my scenario: Development Environment: Visual Studio 2008, Windows 7 Deployment Environment:; Ubuntu 10.04, Apache 2.2.14-5, Mono-runtime 2.4.4.(mono-server2 for ASP.Net 2.0 applications) I have all the dependencies installed.

I'm simply trying to create an ASP.Net MVC 1 web application in Visual Studio and deploy it to Apache with mono running. I'm trying to start with the basics, i.e. deploy default ASP.Net MVC 1 (3.5 framework) project that is created when you start a new project in VS 2008. So far I have been able to create this project, copy dll's to project bin folder (i.e. System.Web.Mvc, .Abstractions, .Routing, .Extensions), reference them from there, publish project to IIS 7 and view it. When trying to deploy it to Apache on Ubuntu, I keep getting a hiccup with regards to an error like this: "The class System.Web.Management.WebRequestErrorEvent could not be loaded....." Now I am led to believe that people have been able to successfully deploy an ASP.Net MVC 1 (3.5 framework) application published from VS 2008, straight into Apache 2.2.14. If you have been able to do this, may you please list down the steps needed to accomplish this, from beginning to end, let's pretend we're all beginners here.

Thanks in advance

TheQuestioner