【问题标题】:System.TypeLoadException with Mono and ASP.NET in Arduino projectArduino 项目中带有 Mono 和 ASP.NET 的 System.TypeLoadException
【发布时间】:2013-10-16 10:46:43
【问题描述】:

我正在尝试使用网页来控制 Arduino 上的 LCD 屏幕。该网页在从 Visual Studio (2012) 运行时有效,但是当尝试使用 mod_mono 部署到我的 Apache 服务器时,我收到了这个神秘的错误。这是完整的错误:

Could not load type 'System.Web.UI.ScriptResourceDefinition' from assembly
'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): mscorlib.
Exception stack trace:
    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

页面底部的 Mono 版本报告为:

Version Information: 3.3.0 (master/6cd4ddc); ASP.NET Version: 4.0.30319.17020

我在应用程序中所做的只是从盒子中获取文本并通过串行方式将其发送到我的 Arduino。

据我所知,我遇到的错误并没有真正告诉我任何事情。可能是因为从实际服务器运行时串行端口不起作用?它适用于 Visual Studios 服务器,Mono 附带的 XPS 测试适用于我的 Apache 服务器。

我想制作这个网页,以便我来自全国各地的朋友可以向我的 Arduino 液晶显示器发送消息。 :) 非常感谢任何可以帮助我的人。

编辑:将 System.Web.Extensions.dll 从 Mono 的文件夹移动到 bin 文件夹后,我收到此错误:

System.InvalidOperationException
Assembly 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not contain a Web resource with name 'jquery'.

Description: HTTP 500.Error processing request.
Details: Non-web exception. Exception origin (name of application or object): System.Web.Extensions.
Exception stack trace:
  at System.Web.UI.ScriptReferenceBase.VerifyAssemblyContainsResource (System.Reflection.Assembly assembly, System.String resourceName, System.Web.UI.WebResourceAttribute& wra) [0x00000] in <filename unknown>:0 
  at System.Web.UI.ScriptReferenceBase.GetScriptName (System.String releaseName, Boolean isDebugMode, System.String[] supportedUICultures, System.Reflection.Assembly assembly, System.Web.UI.WebResourceAttribute& wra) [0x00000] in <filename unknown>:0 
  at System.Web.UI.ScriptReference.GetUrl (System.Web.UI.ScriptManager scriptManager, Boolean zip) [0x00000] in <filename unknown>:0 
  at System.Web.UI.ScriptManager.RegisterScriptReference (System.Web.UI.Control control, System.Web.UI.ScriptReferenceBase script, Boolean loadScriptsBeforeUI) [0x00000] in <filename unknown>:0 
  at System.Web.UI.ScriptManager.OnPreRenderComplete (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Web.UI.Page.OnPreRenderComplete (System.EventArgs e) [0x00000] in <filename unknown>:0 
  at System.Web.UI.Page.ProcessLoadComplete () [0x00000] in <filename unknown>:0 
  at System.Web.UI.Page.InternalProcessRequest () [0x00000] in <filename unknown>:0 
  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0 

有时我会收到此错误,有时与以前相同。我猜这取决于 Apache 的心情。

【问题讨论】:

    标签: c# asp.net apache mono arduino


    【解决方案1】:

    该类在System.Web.Extensions.dll,请确保DLL在您的bin文件夹中。

    【讨论】:

    • 放入该文件后,我从该文件中收到新的投诉:程序集“System.Web.Extensions”不包含名为“jquery”的 Web 资源。我尝试了 Microsoft dll 和 Mono,不幸的是两者都不起作用。
    • 另外,当 Arduino 未拔下时,我收到一条错误消息,提示 COM3 不可用,所以不是这样。
    • 编辑您的问题并粘贴您提到的两个错误,我们无法从此处读取您的计算机屏幕
    • 如果您不想花时间改进某些东西以便 NEXT 人可以从您的经验中受益,那么您不应该使用包含来自所有人的数百万利他主义贡献的 Mono 项目在过去不介意这样做的世界上,与你相反
    • 猜猜我那时不会使用 Mono。我问这个问题是为自己,而不是为其他人。这不是自私,只是想有所作为。
    猜你喜欢
    • 1970-01-01
    • 2012-04-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-24
    相关资源
    最近更新 更多