- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我全新安装了完全更新的 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/ 生成了一个虚拟主机.为了获得正确的二进制路径,我不得不稍微对其进行自定义,但仅此而已。
这是我的虚拟主机内容(我删除了评论):
<VirtualHost *:80>
ServerName sandbox.domain.com
ServerAdmin web-admin@sandbox.domain.com
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#" %>
关于apache - mod_mono 在新安装的 centos 上给出 EOF 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14612055/
读取文件时,我知道提供的最后一个字符是 EOF。现在,当我有 EOF 时会发生什么?该文件中的字符? 如何区分文件的“真实”结尾和 EOF特点? 最佳答案 我决定将我的评论移至答案。 您的文件中不能有
GNU Bash - 3.6.6 Here Documents [n]<<[-]word here-document delimiter If any part of word is
试图查看论坛但无法重新访问。 我正在尝试阅读文本。文字是:“给 b” 但是在使用 fgetc() 时,没有达到 EOF,最后我得到 '\n',然后是无穷大的 'y' 样本。 这是我的代码: Node*
我正在做一个非常简单的作业,需要输出文件的内容,但在做任何事情之前我意外地到达了 EOF。该文件仅包含单词“pig”,并且由于某种原因 EOF 返回 16。我正在使用 Dev-Cpp 并且该程序是用
我的 kubectl 无法读取文件,每次都返回 'error: unexpected EOF'。 kubectl apply -f service.yaml > error: unexpected E
我想知道什么时候使用 cat Hello world! () { setopt localoptions shnullcmd test-nullcmd } # nothing will be
我试图找出我正在向其中写入特定数据的文件中不需要的尾随结束数据的原因,并且不相信我在写入文件时出错。 输出如下: building room_numbr capacity packard
考虑下面的简单例子 #include #include #include using namespace std; int main() { string str = "string";
我在一个程序中有这个片段(在 Visual Studio 2005 中): if(_eof(fp->_file)) { break; } 当达到 eof 时,它打破了封闭循环。但是程序无法解析
我正在尝试为 Typed Racket 中的以下函数定义类型注释: (define (neof x) (if (eof-object? x) #f x)) 不加注释给出了类型: (Any ->
我正在为 Linux 构建系统的模块编写 .spec 文件,遇到一个小问题并想分享它。 用于编写脚本文件: cat /path/to/somewhere/script #blah blah EOF
我有一个 C++ 程序,它从一个文件中读取我希望有一堆格式相同的记录。如果遇到意外情况,无论是记录格式不正确还是输入失败,我都想停止阅读,我想区分这些不同的情况。 我看过 this answer并查看
我注意到它们之间的几个区别: 在 <
预期我正在生成子进程并执行“ssh”远程框。从最近几天开始它工作正常,现在突然间,每当我尝试生成子进程时,它都会抛出错误。不确定发生了什么。 直到现在我一直在使用 pexpect 3.1,我遇到了这个
这个问题已经有答案了: Why two EOF needed as input? [duplicate] (2 个回答) Why do I require multiple EOF (CTRL+Z)
我正在浏览一个文件来寻找特定的词 Char[50]=getline(file,/n) 使用 getline 将每一行存储到一个 char 数组中以与我要查找的字符串进行比较 If( “”==char[
引用两个问题: Incorrect output from C++ Primer 1.4.4 Confused by control flow execution in C++ Primer exam
我刚刚在 this 中找到一条评论回答说在循环条件中使用 iostream::eof “几乎肯定是错误的”。我通常使用类似 while(cin>>n) 的东西——我猜它会隐式检查 EOF。 为什么使用
我刚刚在 this 中找到一条评论回答说在循环条件中使用 iostream::eof “几乎肯定是错误的”。我通常使用类似 while(cin>>n) 的东西——我猜它会隐式检查 EOF。 为什么使用
我刚刚在 this 中找到一条评论回答说在循环条件中使用 iostream::eof “几乎肯定是错误的”。我通常使用类似 while(cin>>n) 的东西——我猜它会隐式检查 EOF。 为什么使用
我是一名优秀的程序员,十分优秀!