单随机CS0006编译错误瓦特/ FastCGI的,单服务器4 [英] Mono random CS0006 compilation errors w/ fastcgi-mono-server4

查看:517
本文介绍了单随机CS0006编译错误瓦特/ FastCGI的,单服务器4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用部署单2.10.8.1W¯¯我的Linux服务器上单声道/ OSX开发的ASP MVC项目/ FastCGI的,单服务器4

I'm trying to deploy an ASP MVC project developed on Mono/OSX on my Linux server using mono 2.10.8.1 w/ fastcgi-mono-server4

web应用程序总是启动正常,但后来我开始变得随机CS0006编译错误各种的URI,一旦他们打破,直到我重新启动服务器应用他们仍然打破。

The webapp always starts fine, but then I start getting random CS0006 compilation errors for various URIs, and once they break, they remain broken until I restart the server application.

这是典型的错误:

Server Error in '/' Application

Compilation Error

Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.

Compiler Error Message: CS0006: Metadata file `/tmp/root-temp-aspnet-0/ed68754/App_global.asax_40e709ea.dll' could not be found

~/Views/Order/Download.aspx

月相关线程,但无论是问题和答案似乎是mod_mono具体,而手工波浪。任何人有什么尝试调试/解决/工作围绕这个问题有什么建议?它变得非常沮丧。尤其是,是否有任何不支持的解决方法,我可以从我的Windows Server计算机复制的东西使用MS实现,而不是越野车单之一?

There is a related thread from January, but both the question and the answer seem to be mod_mono specific and rather hand-wavy. Anyone have any advice on what to try to debug/solve/work around this issue? It's getting very frustrating. In particular, is there any "unsupported" workaround where I can copy something from my Windows Server machines to use an MS implementation instead of the buggy mono one?

(我提交bug报告的了。)

推荐答案

由于错误似乎是问题的单声道JIT试图编译不存在的临时文件,我花了几天试图围绕不同的工作方法这个问题(与解决它)。该工作一个解决方案使用aspnet_compiler在Windows中创建一个可以复制的二进制版本和运行方式,在Linux /单声道(为单色的最新版本现在支持precompiled ASP.NET应用程序)。

Since the errors appear to be issue with the Mono JIT attempting to compile temporary files that don't exist, I spent a few days trying different methods of working around this issue (vs solving it). One solution that worked was using aspnet_compiler on Windows to create a binary version that could be copied and run as-is on Linux/Mono (as the latest versions of Mono now support precompiled ASP.NET applications).

不过,我一直在寻找一个本地Linux的解决方案,我不希望有编译和同步二进制文件(VS同步code的GIT回购)到服务器,所以我一直在寻找另一种解决方案当我提前来了编译,这是pretty大部分Windows上ngen.exe的等价物。跨单

However, I was looking for a native Linux solution, and I don't want to have to compile and sync binaries (vs syncing a GIT repo of code) to the server, so I was looking for another solution when I came across Mono ahead of time compilation, which is pretty much the equivalent of ngen.exe on Windows.

虽然它没有precompile一切,这似乎已经做的伎俩。对我来说,这个部署脚本做这项工作没有任何运行时构建失败:

While it doesn't precompile everything, it seems to have done the trick. For me, this deployment script does the job without any runtime build failures:

xbuild SystemDiscs.sln
mono --aot -O=all SystemDiscs/bin/SystemDiscs*.dll
killall -9 mono
nohup fastcgi-mono-server4 /socket=tcp:127.0.0.1:8000 /applications=/:/var/asp/S
ystemDiscs/SystemDiscs/ > /var/log/systemdiscs.log &

其中, SystemDiscs * .DLL 编译该解决方案的输出与 xbuild 中的第一步。我不认为这precompiles ASP页(和--aot =完全不支持x86,据我可以告诉),但不知何故,它做的工作。我等着看到,是否是只是侥幸,但它已经持续有大约一打提交/部署,因为我问这个十几天前很好,所以我认为其安全地说,它的工作原理。

Where SystemDiscs*.dll is the output of the solution compiled with xbuild in the first step. I don't think this precompiles the ASP pages (and --aot=full isn't supported on x86, as far as I can tell), but somehow it did the job. I was waiting to see whether or not that was just a fluke, but it's been going fine with maybe a dozen commits/deploys since I asked this ten days ago, so I reckon its safe to say it works.

这篇关于单随机CS0006编译错误瓦特/ FastCGI的,单服务器4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆