gpt4 book ai didi

asp.net - 无法使用 mod_mono 托管 ASP.NET MVC 4 应用程序

转载 作者:行者123 更新时间:2023-12-03 15:59:25 26 4
gpt4 key购买 nike

我正在尝试使用 mod_mono 在 apache 中托管 ASP.NET MVC 4 应用程序,但我不断收到以下错误:

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: Initial exception ---> System.Configuration.ConfigurationErrorsException: Error deserializing configuration section httpRuntime: Unrecognized attribute 'targetFramework'. (/var/www/nishkriya/Web.config line 1)
at System.Configuration.ConfigurationSection.DeserializeSection (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.GetSectionInstance (System.Configuration.SectionInfo config, Boolean createDefaultInstance) [0x00000] in <filename unknown>:0
at System.Configuration.ConfigurationSectionCollection.get_Item (System.String name) [0x00000] in <filename unknown>:0
at System.Configuration.Configuration.GetSection (System.String path) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName, System.String path, System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.Configuration.WebConfigurationManager.GetSection (System.String sectionName) [0x00000] in <filename unknown>:0
at System.Web.HttpRuntime..cctor () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---

我从源代码编译了 mono 和 mod_mono。

root@inez ~# mono --version
Mono JIT compiler version 3.0.7 ((no/514fcd7 Thu Mar 21 22:55:42 GMT 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: __thread
SIGSEGV: altstack
Notifications: epoll
Architecture: amd64
Disabled: none
Misc: softdebug
LLVM: supported, not enabled.
GC: Included Boehm (with typed GC and Parallel Mark)

应用程序设置为使用/usr/local/bin/mod_mono_server4 指向

exec /usr/local/bin/mono $MONO_OPTIONS "/usr/local/lib/mono/4.5/mod-mono-server4.exe" "$@"

谢谢

最佳答案

这闻起来像是一个糟糕的安装。您是否在/usr/bin 中安装了另一个单声道(除了/usr/local/bin)?如果是,那么你应该删除你的盒子并重新开始,但这次看看这个 guide .

关于asp.net - 无法使用 mod_mono 托管 ASP.NET MVC 4 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15852524/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com