我在 2003 年创建的一个 ASP.NET/C# 项目已经在大学服务器上运行了 10 多年,但我刚刚被告知服务器崩溃了,他们正在尝试重新设置所有内容。
他们收到以下错误。
我在底部看到他们似乎已经在 Debian 机器上安装了 Mono。可能是他们安装了 Mono 但忘记安装 C# 编译器,还是此消息暗示其他问题?
此错误的原因和解决方案可能是什么?
根据BuildManager
Mono 中的代码:
if (configSection == null)
config = WebConfigurationManager.GetWebApplicationSection ("system.web/compilation") as CompilationSection;
else
config = configSection;
...
if (throwOnMissing)
throw new HttpException (String.Concat ("No compiler for language '", language, "'."));
它显然没有在配置中找到 C# 的编译部分。你检查过 machine.config 或 web.config 吗?例如
<system.web>
<compilation defaultLanguage="C#">
<compilers>
You should have a .NET compiler configuration here.
</compilers>
</compilation>
</system.web>
查看此页面了解更多信息。
这也可能是一个解码错误,因为他可以识别 '\C#\' 尝试在您的目录上重新使用 dos2unix