当我重置 apache 并加载我的网站时,我得到下面的第一个错误。我不知道问题是什么。如果我再次重新加载页面(不重新启动 apache)我得到第二个错误,可能是因为第一个错误发生并且 BaseUser 是 Application_Start 使用的第一个类/函数。
为什么我会收到此负载异常?什么搞砸了,我尝试使用 mono 的 VMWare img 来调试它,我得到了同样的异常(直到我重新启动它现在拒绝给我除了404 错误之外的任何东西)。但是,当我使用单声道开发来运行项目时,该站点运行完美。哇。
有任何想法吗?
Server Error in '/' Application
A type load exception has occurred.
Description: HTTP 500. Error processing request.
Stack Trace:
System.TypeLoadException: A type load exception has occurred.
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Version information: Mono Runtime Version: 2.8.1 (tarball Mon Dec 27 10:20:03 UTC 2010); ASP.NET Version: 2.0.50727.1433
第二:
Server Error in '/' Application
Could not load type 'mynamespace.BaseUser' from assembly 'mynamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
Description: HTTP 500. Error processing request.
Stack Trace:
System.TypeLoadException: Could not load type 'mynamespace.BaseUser' from assembly 'mynamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at mynamespace.Global.Application_Start (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
Version information: Mono Runtime Version: 2.8.1 (tarball Mon Dec 27 10:20:03 UTC 2010); ASP.NET Version: 2.0.50727.1433
-edit- 我会提到我在opensuse和我的网站上都尝试过MonoDevelops构建我的网站,但我遇到了完全相同的问题。