【问题标题】:Mono FastCGI Server - Applications don't work below rootMono FastCGI 服务器 - 应用程序在根目录下无法运行
【发布时间】:2013-08-05 02:09:06
【问题描述】:

好吧,我想不通。我有一个测试 MVC 应用程序(razoronmono)。我今天刚从master编译了mono,还有xsp。我今天也编译了nginx。我正在运行 Ubuntu 13.04 最小版本。

这有效: http://coh2.us.to/razoronmono/

这不会: http://coh2.us.to/apps/razoronmono/

子目录中的所有代码都是一样的...

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

nginx 配置: 位置 / {

    }
    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;
    }

我收到以下错误:

System.InvalidOperationException 无法映射路径 '/apps/_ViewStart.cshtml'

描述:HTTP 500.Error processing request.

详细信息:非网络异常。异常来源(应用程序名称或 对象):System.Web。异常堆栈跟踪:在 System.Web.HttpRequest.MapPath (System.String virtualPath, System.String baseVirtualDir,布尔值 allowCrossAppMapping) [0x001a4] 在 /usr/src/mono/mcs/class/System.Web/System.Web/HttpRequest.cs:1572 在 System.Web.HttpRequest.MapPath (System.String virtualPath) [0x0000d] 在 /usr/src/mono/mcs/class/System.Web/System.Web/HttpRequest.cs:1526 在 System.Web.Hosting.HostingEnvironment.MapPath (System.String virtualPath) [0x00042] 在 /usr/src/mono/mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs:156 在 System.Web.Hosting.DefaultVirtualPathProvider.FileExists (System.String virtualPath) [0x00016] 在 /usr/src/mono/mcs/class/System.Web/System.Web.Hosting/DefaultVirtualPathProvider.cs:68 在 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 页面,System.String 文件名,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 继续)[0x00000] in :0

【问题讨论】:

    标签: mono fastcgi xsp


    【解决方案1】:

    最近,由于 Google Summer of Code,xsp 存储库正在经历严重的重构。这些重构可能会导致回归。那么:

    1. 请编译xsp标签3.0.10而不是master,看看问题是否消失。
    2. 如果是这样,请在http://bugzilla.xamarin.com/ 中提交错误(并在摘要中添加“[regression]”)并在 irc://irc.gnome.org/monodevelop 中联系@minibill,让他提前了解他可能引入的问题。
    3. 如果问题没有消失,请在http://bugzilla.xamarin.com/ 中提交错误。

    【讨论】:

    • 没有标签 3.0.10。我已经编译了标签 3.0.11,这是我目前正在使用的,但不幸的是它没有解决错误。
    • 我已经添加了错误,希望是正确的,我以前从未使用过 Bugzilla:bugzilla.xamarin.com/show_bug.cgi?id=13768
    • 如果它没有解决错误,那么它不是回归,所以请从你的错误摘要中删除“回归”一词
    • 对不起。我已经修复了摘要描述。
    • 酷;另外:摘要仍然没有很好地描述错误。 “不工作是什么意思”?请说明“网站仅在域的根文件夹中有效”之类的内容
    猜你喜欢
    • 1970-01-01
    • 2018-04-16
    • 1970-01-01
    • 2011-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多