使用最新的mod_mono和xsp4时的NullReferenceExceptions

时间:2014-05-10 09:03:54

标签: asp.net apache mono nullreferenceexception mod-mono

我需要帮助弄清楚我的单声道设置中出了什么问题。当我尝试在apache / mod_mono上运行webforms和mvc3应用程序时,我得到NullReferenceExceptions。

这是我尝试在浏览器上加载页面时遇到httpd错误日志的例外情况:

访问网络表单页面:

An exception has occurred while generating HttpException page:
System.NullReferenceException: Object reference not set to an instance of an object
  at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00000] in <filename unknown>:0
  at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x00000] in <filename unknown>:0

The actual exception which was being reported was:
System.Web.HttpException:  ---> System.NullReferenceException: Object reference not set to an instance of an object
  at System.Web.HttpApplication.InitOnce (Boolean full_init) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
An exception has occurred while generating HttpException page:
System.NullReferenceException: Object reference not set to an instance of an object
  at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00000] in <filename unknown>:0
  at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x00000] in <filename unknown>:0

The actual exception which was being reported was:
System.Web.HttpException: Server cannot flush a completed response
  at System.Web.HttpResponse.Flush (Boolean final_flush) [0x00000] in <filename unknown>:0
  at System.Web.HttpApplication.OutputPage () [0x00000] in <filename unknown>:0

访问mvc3页面:

An exception has occurred while generating HttpException page:
System.NullReferenceException: Object reference not set to an instance of an object
  at System.Web.Util.HttpEncoder.GetCustomEncoderFromConfig () [0x00000] in <filename unknown>:0
  at System.Lazy`1[System.Web.Util.HttpEncoder].InitValue () [0x00000] in <filename unknown>:0

The actual exception which was being reported was:
System.Web.HttpException:  ---> System.NullReferenceException: Object reference not set to an instance of an object
  at System.Web.Compilation.BuildManager.Build (System.Web.VirtualPath vp) [0x00000] in <filename unknown>:0
  at System.Web.Compilation.BuildManager.GetCompiledType (System.Web.VirtualPath virtualPath) [0x00000] in <filename unknown>:0
  at System.Web.Compilation.BuildManager.GetCompiledType (System.String virtualPath) [0x00000] in <filename unknown>:0
  at System.Web.HttpApplicationFactory.InitType (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---

当我运行xsp4时,另一个症状是类似的例外:

xsp4

Exception caught during reading the configuration file:
System.NullReferenceException: Object reference not set to an instance of an object
  at Mono.WebServer.XSP.Server+ApplicationSettings..ctor () [0x00000] in <filename unknown>:0
xsp4
Listening on address: 0.0.0.0
Root directory: /usr/local/src
Listening on port: 8080 (non-secure)
Hit Return to stop the server.

停止服务器不会导致异常。我想知道这里的根目录是否正确? xsp试图读取哪个配置文件?


这里有关于版本等的数据:

使用前缀/ usr从git编译mono,mod_mono和xsp,版本为:

mono -V
Mono JIT编译器版本3.4.1(master / d3e5522 Fri May 9 20:16:07 MSD 2014)
版权所有(C)2002-2014 Novell,Inc,Xamarin Inc和Contributors。 www.mono-project.com
        TLS:__thread
        SIGSEGV:altstack
        通知:epoll
        架构:x86
        残疾人:没有         杂项:softdebug
        LLVM:支持,未启用。
        GC:sgen

 mod-mono-server4 --version
mod-mono-server4.exe 3.0.0.0
(c)(c)2002-2011 Novell,Inc。
XSP的Mod_mono后端

mod-mono-server4文件内容:
exec / usr / bin / mono $ MONO_OPTIONS&#34; /usr/lib/mono/4.5/mod-mono-server4.exe" &#34; $ @&#34;

 xsp4 --version
xsp4.exe 3.0.0.0
版权所有(C)2002-2011 Novell,Inc。
用于测试System.Web的简约Web服务器



你们能在这里发现任何错误吗?我该怎么做才能解决这个问题?到目前为止,我还没有找到任何可用的东西。


我确实发现了同样的异常描述,但在我的情况下,xsp不是旧版本。 https://www.meebey.net/posts/mono_3.0_preview_debian_ubuntu_packages/

0 个答案:

没有答案