Mono FastCGI Server - Applications don't work below root

567 Views Asked by At

Okay, I cannot figure this out. I have a test MVC app (razoronmono). I just compiled mono from master today, as well as xsp. I also compiled nginx today. I'm running Ubuntu 13.04 minimal.

This works: http://coh2.us.to/razoronmono/

This doesn't: http://coh2.us.to/apps/razoronmono/

All code in the subdirectories is the same...

applications="/:/srv/www,/razoronmono:/srv/www/razoronmono,/apps/razoronmono:/srv/www/apps/razoronmono"

nginx config: location / {

    }
    location /razoronmono {
            include /etc/nginx/fastcgi_params;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index /;
    }

    location /apps/razoronmono {
            include /etc/nginx/fastcgi_params;
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index /;
    }
    location ~ \.(aspx|asmx|ashx|asax|ascx|soap|rem|axd|cs|config|dll)$ {
        fastcgi_pass   127.0.0.1:9000;
        include        /etc/nginx/fastcgi_params;
    }

I get the following error:

System.InvalidOperationException Failed to map path '/apps/_ViewStart.cshtml'

Description: HTTP 500.Error processing request.

Details: Non-web exception. Exception origin (name of application or object): System.Web. Exception stack trace: at System.Web.HttpRequest.MapPath (System.String virtualPath, System.String baseVirtualDir, Boolean allowCrossAppMapping) [0x001a4] in /usr/src/mono/mcs/class/System.Web/System.Web/HttpRequest.cs:1572 at System.Web.HttpRequest.MapPath (System.String virtualPath) [0x0000d] in /usr/src/mono/mcs/class/System.Web/System.Web/HttpRequest.cs:1526 at System.Web.Hosting.HostingEnvironment.MapPath (System.String virtualPath) [0x00042] in /usr/src/mono/mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs:156 at System.Web.Hosting.DefaultVirtualPathProvider.FileExists (System.String virtualPath) [0x00016] in /usr/src/mono/mcs/class/System.Web/System.Web.Hosting/DefaultVirtualPathProvider.cs:68 at System.Web.WebPages.FileExistenceCache.FileExists (System.String virtualPath) [0x00000] in :0 at System.Web.WebPages.VirtualPathFactoryManager.PageExistsInVPP (System.String virtualPath, Boolean useCache) [0x00000] in :0 at System.Web.WebPages.VirtualPathFactoryManager.PageExists (System.String virtualPath, Boolean useCache) [0x00000] in :0 at System.Web.WebPages.WebPageExecutingBase.FileExists (System.String path, Boolean useCache) [0x00000] in :0 at System.Web.WebPages.StartPage.GetStartPage (System.Web.WebPages.WebPageRenderingBase page, System.String fileName, IEnumerable1 supportedExtensions) [0x00000] in <filename unknown>:0 at System.Web.Mvc.RazorView.RenderView (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer, System.Object instance) [0x00000] in <filename unknown>:0 at System.Web.Mvc.BuildManagerCompiledView.Render (System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer) [0x00000] in <filename unknown>:0 at System.Web.Mvc.ViewResultBase.ExecuteResult (System.Web.Mvc.ControllerContext context) [0x00000] in <filename unknown>:0 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ActionResult actionResult) [0x00000] in <filename unknown>:0 at System.Web.Mvc.ControllerActionInvoker+<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19 () [0x00000] in <filename unknown>:0 at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter (IResultFilter filter, System.Web.Mvc.ResultExecutingContext preContext, System.Func1 continuation) [0x00000] in :0

1

There are 1 best solutions below

5
On

The xsp repo is undergoing these days severe refactorings due to Google Summer of Code. These refactorings could likely cause regressions. Then:

  1. Please compile xsp tag 3.0.10 instead of master, to see if the problem goes away.
  2. If it does, please file a bug in http://bugzilla.xamarin.com/ (and add "[regression]" in the summary) and contact @minibill in irc://irc.gnome.org/monodevelop to give him a heads up about the problem he might have introduced.
  3. If the problem doesn't go away, file the bug in http://bugzilla.xamarin.com/.