我正在尝试使用网页来控制 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的心情。