mod_mono 在新安装的 centos 上出现 EOF 错误

2024-04-29

我全新安装了 Centos 6.3,已完全更新。 我已经从源安装了 mono、xsp 和 mod_mono。每个包都完美编译。它们都以 /usr/local/mono 前缀安装(因此所有内容都位于 /usr/local/mono 下)

我已将“Include conf/mod_mono.conf”添加到我的 httpd.conf 文件中。 我使用生成了一个虚拟主机http://go-mono.com/config-mod-mono/ http://go-mono.com/config-mod-mono/。我必须稍微自定义它才能获得正确的二进制路径,但仅此而已。

这是我的虚拟主机内容(我删除了评论):

<VirtualHost *:80>
  ServerName sandbox.domain.com
  ServerAdmin [email protected] /cdn-cgi/l/email-protection
  DocumentRoot /u01/www/vhosts/asp
  MonoServerPath sandbox.domain.com "/usr/local/mono/bin/mod-mono-server2"
  MonoDebug sandbox.domain.com true
  MonoSetEnv sandbox.domain.com MONO_IOMAP=all
  MonoApplications sandbox.domain.com "/:/u01/www/vhosts/asp"
  <Location "/">
    Allow from all
    Order allow,deny
    MonoSetServerAlias sandbox.domain.com
    SetHandler mono
  </Location>
</VirtualHost>

这是我尝试加载的页面(default.aspx):

<html>
<body>
Hello
</body>
</html>

它既漂亮又简单。当我访问它时,它给出了以下错误:

System.Web.Compilation.CompilationException
CS1576: The line number specified for #line directive is missing or invalid

Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
Details: CS1576: The line number specified for #line directive is missing or invalid
Error origin: Compiler
Error source file: /default.aspx
Exception stack trace:
at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath, System.CodeDom.Compiler.CompilerParameters options) [0x0035f] in /usr/local/src/mono-3.0.3/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs:853 
  at System.Web.Compilation.AssemblyBuilder.BuildAssembly (System.Web.VirtualPath virtualPath) [0x00000] in /usr/local/src/mono-3.0.3/mcs/class/System.Web/System.Web.Compilation/AssemblyBuilder.cs:731 
  at System.Web.Compilation.BuildManager.GenerateAssembly (System.Web.Compilation.AssemblyBuilder abuilder, System.Web.Compilation.BuildProviderGroup group, System.Web.VirtualPath vp, Boolean debug) [0x00258] in /usr/local/src/mono-3.0.3/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:846 
  at System.Web.Compilation.BuildManager.BuildInner (System.Web.VirtualPath vp, Boolean debug) [0x0011c] in /usr/local/src/mono-3.0.3/mcs/class/System.Web/System.Web.Compilation/BuildManager.cs:469 

文档根目录中没有其他文件。只是default.aspx。 apache 错误日志中不会生成任何条目。 如果我将引擎从 mod-mono-server2 切换到 mod-mono-server4 (我们更喜欢使用),我会在 apache 错误日志中看到以下内容(在 apache 启动时):

Listening on: /tmp/mod_mono_server_globalListening on: /tmp/mod_mono_server_global
Root directory: /

Root directory: /
Error: Address already in use
mod-mono-server4
Exception caught during reading the configuration file:
System.MissingMethodException: Method not found: 'System.Configuration.IConfigurationSectionHandler.Create'.
  at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationManager.get_AppSettings () [0x00000] in <filename unknown>:0
  at Mono.WebServer.Apache.Server.get_AppSettings () [0x00001] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer.Apache/main.cs:208
  at Mono.WebServer.Apache.Server+ApplicationSettings..ctor () [0x0002a] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer.Apache/main.cs:63
mod-mono-server4
Listening on: /tmp/mod_mono_server_sandbox.domain.com
Root directory: /u01/www/vhosts/asp

访问同一页面后,我收到 500 错误,并在 apache 错误日志中显示以下内容:

Worker initialization exception occurred. Continuing anyway:
System.MissingMethodException: Method not found: 'System.Configuration.IConfigurationSectionHandler.Create'.
  at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationManager.GetSection (System.String sectionName) [0x00000] in <filename unknown>:0
  at System.Configuration.ConfigurationManager.get_AppSettings () [0x00000] in <filename unknown>:0
  at Mono.WebServer.ModMonoWorkerRequest..cctor () [0x00034] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer.Apache/ModMonoWorkerRequest.cs:85
System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.WebServer.BaseApplicationHost.EndOfRequest (Mono.WebServer.MonoWorkerRequest mwr) [0x00029] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer/BaseApplicationHost.cs:141
  at Mono.WebServer.ModMonoApplicationHost.ProcessRequest (Int32 reqId, System.String verb, System.String queryString, System.String path, System.String protocol, System.String localAddress, Int32 serverPort, System.String remoteAddress, Int32 remotePort, System.String remoteName, System.String[] headers, System.String[] headerValues, System.Object worker) [0x00173] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer.Apache/ModMonoApplicationHost.cs:109
  at (wrapper remoting-invoke-with-check) Mono.WebServer.ModMonoApplicationHost:ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[],object)
  at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00199] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer.Apache/ModMonoWorker.cs:239
  at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00002] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer.Apache/ModMonoWorker.cs:92
[Wed Jan 30 15:22:43 2013] [error] (70014)End of file found: read_data failed
[Wed Jan 30 15:22:43 2013] [error] Command stream corrupted, last command was -1
System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.WebServer.BaseApplicationHost.EndOfRequest (Mono.WebServer.MonoWorkerRequest mwr) [0x00029] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer/BaseApplicationHost.cs:141
  at Mono.WebServer.ModMonoApplicationHost.ProcessRequest (Int32 reqId, System.String verb, System.String queryString, System.String path, System.String protocol, System.String localAddress, Int32 serverPort, System.String remoteAddress, Int32 remotePort, System.String remoteName, System.String[] headers, System.String[] headerValues, System.Object worker) [0x00173] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer.Apache/ModMonoApplicationHost.cs:109
  at (wrapper remoting-invoke-with-check) Mono.WebServer.ModMonoApplicationHost:ProcessRequest (int,string,string,string,string,string,int,string,int,string,string[],string[],object)
  at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00199] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer.Apache/ModMonoWorker.cs:239
  at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00002] in /usr/local/src/xsp-2.10.2/src/Mono.WebServer.Apache/ModMonoWorker.cs:92
[Wed Jan 30 15:22:43 2013] [error] (70014)End of file found: read_data failed
[Wed Jan 30 15:22:43 2013] [error] Command stream corrupted, last command was -1

有谁知道为什么会这样?


晚了两年,但以防万一有人再次遇到这个问题......

我相信答案是在 aspx 文件中声明所需的编译语言。在 .aspx 文件顶部添加以下行,我敢打赌它会起作用:

<%@ Page Language="C#" %>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

mod_mono 在新安装的 centos 上出现 EOF 错误 的相关文章

随机推荐

  • 使用存储库模式的 ASP.NET MVC

    目前 我在所有操作中使用 EF 并直接使用其数据上下文 但自从我开始阅读有关松散耦合和可测试性的内容后 我认为这不是最好的方法 在开始重构所有当前代码之前 我试图了解所有的优点和缺点 问题一 考虑到每个实体都需要自己的存储库 因此必须设置自
  • 弗雷格相当于哈斯克尔的“交互”函数是什么?

    我尝试从在 Frege 中运行的现实世界 Haskell 中获取字数示例 main interact wordCount where wordCount input show length lines input n 但我得到 can t
  • 通过套接字发送公钥的安全方法

    通过套接字向另一个用户发送 RSA PublicKey 的安全方法是什么 我正在考虑将密钥导出到 ByteQueue 并将字节数组发送给用户 他可以在其中再次构造公钥 或者这是否会泄露可能被滥用的信息 Generate keys AutoS
  • RichFaces ExtendedTableDataModel:对列进行排序检索所有行

    我们使用 ExtendedTableDataModel 进行分页 这样做是为了使用 Hibernate 检索一组结果 并在请求另一个页面时加载下一组结果 一切正常 但如果我们在 rich dataTable 中使用 rich column
  • 将命令行参数传递给 SML 脚本

    如何将命令行参数传递给 SML 脚本 我知道有一个CommandLine arguments 正确类型的函数 unit gt string list 但像这样调用解释器 sml script name sml an argument ano
  • Python elasticsearch DSL 聚合/每个文档嵌套值的度量

    我试图找到 2 级嵌套中的最小值 每个文档单独的最小值 到目前为止 我能够进行聚合 计算搜索结果中所有嵌套值的最小值 但无需按文档进行分隔 我的示例架构 class MyExample DocType myexample id Intege
  • 使用 UIAppearance API 自定义 UIBarButtonSystemItem 的色调颜色

    我知道我可以定制UIBarButtonItem文本通过 setTitleTextAttributes forState 还有一种方法可以自定义UITabBar图标通过 setSelectedImageTintColor 有没有办法自定义色调
  • 如何加载 caffe 模型并转换为 numpy 数组?

    我有一个 caffemodel 文件 其中包含 ethereon 的 caffe tensorflow 转换实用程序不支持的层 我想生成我的咖啡模型的 numpy 表示 我的问题是 如何将 caffemodel 文件 我还有 prototx
  • 如何将 HTML 转换为保留换行符的文本

    我如何将 HTML 转换为保留换行符的文本 由 br p div 等元素生成 可能使用NekoHTML http nekohtml sourceforge net 或任何足够好的 HTML 解析器 Example Hello br Worl
  • 如何在批处理中返回数组的元素?

    我的程序中的数组列表中有两个元素 如何将变量分配给等于其中一个元素 这是代码 echo off setlocal enabledelayedexpansion set p string for l a in 0 1 1000 do if n
  • 在 Windows 上实现堆栈跟踪 [关闭]

    Closed 这个问题是无法重现或由拼写错误引起 help closed questions 目前不接受答案 我正在为我正在编写的游戏实现一个崩溃报告工具 并且我想为该报告提供 相当 详细的本机堆栈跟踪 我已经在 GNU Linux 上实现
  • Firebase通过时间戳获取数据

    我需要使用过滤数据来获取时间戳匹配的特定数据 例如我需要数据在哪里arrivalTime与数据库中的精确日期和时间字段 时间戳字段匹配 我正在尝试下面 但它没有返回任何数据 arrivalTIme moment todaysDate for
  • 如何避免MySQL'尝试获取锁时发现死锁;尝试重新启动交易'

    我有一个innoDB表 记录在线用户 它会在用户每次刷新页面时进行更新 以跟踪他们所在的页面以及他们上次访问该网站的日期 然后我有一个每 15 分钟运行一次的 cron 来删除旧记录 我收到 尝试获取锁定时发现死锁 昨晚尝试重新启动事务大约
  • BigQuery GitHub 数据:如何处理存储库名称更改?

    我的目标是跟踪我的仓库的星星总数 然而 它的 repo name 随着时间的推移而改变 如何实现这一目标githubarchive数据集 相关https stackoverflow com a 42930963 132438 https s
  • 创建适配器映像时无法应用对象中的 object()

    我正在创建适配器映像 但遇到以下 2 个错误 这是代码 public class GridViewAdapter private Context mcontext private int layoutResourceId public Gr
  • 从 iBeacon 接收 BLE 信号到 Bluno(arduino with BLE)

    我想从 iBeacon 到 Bluno 接收 rssi 信号和 UUID Arduino 板具有 BLE 对此有一些疑问 有没有从 BLE 到 BLE 接收 UUID 和 rssi 的解决方案 两个BLE设备可以互相通信吗 我想找一些网站来
  • 检索 Couchbase 的所有记录(文档)

    我正在使用 node js 并寻找一种方法来获取特定的 couchbase 桶的所有文档 有没有没有循环和增量索引的解决方案 我知道我可以制作一个原子键 然后通过循环使用它来检索所有数据 但我需要一个返回所有文档的函数 是否有任何函数 至少
  • 自动播放视频的 canvas.drawimage 仅在视频元素可见时有效

    我试图通过将视频绘制到画布上来在视频上添加一些滤镜 问题是 当视频元素不在视图中时 它会停止绘制 理想情况下 我想将视频元素全部隐藏起来 我认为它只影响 Chrome 浏览器 另外 似乎如果您停止并用鼠标启动它 问题就会消失 functio
  • *ngIf 中的@ViewChild

    Question 最优雅的获取方式是什么 ViewChild显示模板中的相应元素后 下面是一个例子 还Plunker http plnkr co edit xAhnVVGckjTHLHXva6wp p preview可用的 组件 templ
  • mod_mono 在新安装的 centos 上出现 EOF 错误

    我全新安装了 Centos 6 3 已完全更新 我已经从源安装了 mono xsp 和 mod mono 每个包都完美编译 它们都以 usr local mono 前缀安装 因此所有内容都位于 usr local mono 下 我已将 In