Domanda

ASP.NET MVC4 application is running on example.com site root using mod_mono and Mono 3.2.8 in Debian Linux.

Mono control panel is enabled using config below.

Typing http://example.com/mono in browser returns 404 error below.

It looks like this request is routed to application and not handled by mod_mono.

How to use mod_mono control panel if asp.net mvc application is running in site root ?

store.conf:

Alias / "/var/www/store"
MonoServerPath "/opt/m328/bin/mod-mono-45est"
MonoApplications "/:/var/www/store"
  <Location "/">
    Allow from all
    Order allow,deny
    SetHandler mono
  </Location>

mod_mono.conf:

<IfModule !mod_mono.c>
    LoadModule mono_module /opt/m328/mod_mono-2.10/src/.libs/mod_mono.so
</IfModule>


<Location /mono>
  SetHandler mono-ctrl
Order deny,allow
Allow from all
</Location>
MonoAutoApplication disabled

Error returned:

System.Web.HttpException
The resource cannot be found.

Description: HTTP 404.The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Details: No virtual path information available.
Exception stack trace:
  at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance (System.Web.Routing.RequestContext requestContext, System.Type controllerType) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.DefaultControllerFactory.CreateController (System.Web.Routing.RequestContext requestContext, System.String controllerName) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.MvcHandler.ProcessRequestInit (System.Web.HttpContextBase httpContext, IController& controller, IControllerFactory& factory) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.MvcHandler.BeginProcessRequest (System.Web.HttpContextBase httpContext, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.MvcHandler.BeginProcessRequest (System.Web.HttpContext httpContext, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0 
  at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest (System.Web.HttpContext context, System.AsyncCallback cb, System.Object extraData) [0x00000] in <filename unknown>:0 
  at System.Web.HttpApplication+<Pipeline>c__Iterator1.MoveNext () [0x00000] in <filename unknown>:0 
  at System.Web.HttpApplication.Tick () [0x00000] in <filename unknown>:0 
Version Information: 3.2.8 (tarball K veebr 26 18:28:53 EET 2014); ASP.NET Version: 4.0.30319.17020
È stato utile?

Soluzione

To me, it is application itself has problem, not mod_mono or mod_mono config, as it has figure out MVC

Altri suggerimenti

Make sure you have a Controller and a method inside it

Then invoke the URL using:

baseUrl/Controller/Method

Should help the issue

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top