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 错误 的相关文章

  • Apache mod_rewrite 内部到不同的端口

    是否可以使用 mod rewrite 内部重定向 因此地址栏中的 url 不会更改 到同一主机上的不同端口 例如 http host com 8080 gt http host com 9999 myapplication param va
  • Amazon EC2 - Apache 服务器重启问题

    当我运行这个命令时 sudo etc init d httpd restart 它给出以下错误 停止 httpd 失败 启动 httpd 98 地址已在使用中 make sock 无法绑定到地址 80 98 地址已在使用 make sock
  • 扩展 Mono C# 编译器:有任何文档或先例吗?

    我目前正在参与一些有趣的编程语言研究 到目前为止 这些研究的重点是通过一些非常强大的基于程序员生产力的功能来扩展即将推出的 Java 7 0 编译器 这项工作应该同样适用于 C 等相关编程语言 我目前正在研究用于对该功能的 C 端口进行原型
  • 在 XAMPP 上设置虚拟主机

    我已经在 Ubuntu 上的 opt lampp 目录中安装了 XAMPP 并且想要设置一些虚拟主机 Apache 虚拟主机教程说明放置
  • Mono 和 WebRequest 速度 - 测试

    在 mono 4 6 2 linux 中 我注意到 wget 下载文件的速度与webclient DownloadString 所以我做了一个小测试来调查 为什么 wget 明显比 C 快 根据我自己的实验 使用 wget 下载 手动读取文
  • 配置 shiro.ini 以进行 JDBC 连接

    作为我新的一年学习新技术计划的一部分 我开始尝试使用 Apache Shiro 安全框架 我设法让基本示例正常工作 该示例将用户名 密码和角色存储在 shiro ini 文件中 但是当我修改 shiro ini 文件以使用 JDBC 时 它
  • 仅当未找到文件时才重定向请求?

    我希望有一种方法可以使用 mod rewrite 和 Apache 来做到这一点 但也许还有另一种方法可以考虑 在我的网站上 我为客户的网站重新设计版本设置了目录 如果网络根目录是 home blah www 客户端目录将是 home bl
  • 使用 Xamarin 主题的 Gtk 应用程序非一致性执行

    我有一个 mkbundled mono 应用程序 其中嵌入了 mono 我使用 platypus 创建了一个独立的包 我使用以下内容加载 Mac 主题 Xamarin Gtk Rc Parse Default gtkrc 主题是Xamari
  • 将应用程序级别用户名/用户 ID 注入 nginx/Apache 日志

    有没有办法将应用程序级别的用户名或 id 在本例中为 django 用户名或 id 注入 Apache 或 ngnix 日志中 请注意 我不是询问 HTTP 身份验证用户名 我目前正在使用一个简短的自定义中间件将此数据添加到响应标头 如下所
  • Ubuntu 12.04 上的 PHP 从 5.3 升级到 php 5.6

    我正在按照本教程将 php 从版本 5 3 升级到 5 6 http phpave com upgrade php 53 to php 56 on ubuntu 1204 lts http phpave com upgrade php 53
  • 设置 Silex Bootstrap 时出现 Apache 错误:无法检查 htaccess 文件

    我正在尝试使用 Silex Bootstrap 建立一个网站 我已将它与其他 Web 项目一起放在我的文件夹中 并更改了 Apache 配置中的 DocumentRoot
  • PHP和.htaccess认证解决方案

    这是布局 web root admin dir index php js img other files dirs dir files 到目前为止 我使用 htaccess passwd 保护管理目录 因为我希望对该目录中的所有文件 包括
  • 如何使用 gradle 将 org.apache.commons.lang3 添加到 Android Studio

    Due to 这个问题 https stackoverflow com questions 994331 java how to decode html character entities in java like httputility
  • cursorMark是无状态的以及它如何解决深度分页

    作为指定here https cwiki apache org confluence display solr Pagination of Results光标标记是无状态的 但我不明白它是如何解决无状态的深度分页问题的 solr 是否按唯一
  • 未加载 Firebird 扩展

    我正在尝试在 PHP 中使用 Firebird 扩展 我有扩展文件 php pdo firebird dll php interbase dll in my ext文件夹 我将它们添加到我的php ini像这样文件 PHP PDO FIRE
  • 在读取正文之前拒绝 HTTP 请求

    我正在开发一个网站 用户需要上传一些非常大的文件 该网站是用 PHP 编写的 在某些情况下 我想根据标头拒绝文件 理想情况下 我想在收到标头后立即拒绝请求 而不读取正文 如果标头足以表明该文件应被拒绝 则没有理由读取 200M 的文件 此外
  • 间歇性 PHP 抽象类错误

    我已经为此奋斗了一段时间 但无法弄清楚 也许其他人也有 或者 Slim PHP Apache 等这里有更深层次的问题 在正常工作几个小时后 我的 Slim 安装将开始给出所有路线均如此 致命错误 类 Slim Collection 包含 1
  • 使用 Java 的 Apache Http 摘要身份验证

    我目前正在开发一个 Java 项目 但无法使 http 摘要身份验证正常工作 我尝试使用 Apache 网站 但没有帮助 我有一个需要 HTTP 摘要身份验证的网站 DefaultHttpClient httpclient new Defa
  • 使用 WSGI 在 Windows XAMPP 中设置 Python 路径

    我正在 Webfaction 上设置实时服务器的开发版本 在本地计算机上的虚拟 Apache 服务器环境 运行没有任何错误 中运行 Django 应用程序 XP 使用 Python 2 6 运行 XAMPP Lite 我可以提交更改通过 G
  • Capistrano 和 XSendFile 配置

    我正在尝试使用 Apache 2 2 Passenger 4 0 59 和 XSendFile 0 12 配置 Rails 生产服务器 应用程序通过 Capistrano 部署 部署的应用程序生成 可能很大 PDF Rails root t

随机推荐

  • 使用存储库模式的 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