我正在我的 Mac 上使用 MonoDev,并想看看它可以如何运行我研究过的基本 ASP.NET 应用程序。
我选择了一个非常基本的站点,它有一些 ASP.NET 页面,所有这些页面都继承了嵌套母版页和一些 ASP.NET AJAX 内容。该项目是 .NET 2.0,我为 ASP.NET AJAX 1.0 设置了适当的 web.config。
在 Windows 下,它运行没有任何戏剧性,因为它非常简单,我希望它在 MonoDev 中也能“正常工作”。问题是,当我使用 MonoDev 的内置 Web 服务器运行时,出现以下异常:
“/”应用程序中的服务器错误
你调用的对象是空的
说明:HTTP 500。处理请求时出错。
堆栈跟踪:
System.NullReferenceException:对象引用未设置为 System.Web.Handlers.ScriptResourceHandler.EncryptString (System.String s) [0x00000] in :0 at System.Web.Handlers.ScriptResourceHandler+RuntimeScriptResourceHandler.System.Web 的对象实例.Handlers.IScriptResourceHandler.GetScriptResourceUrl(System.Reflection.Assembly 程序集,System.String resourceName,System.Globalization.CultureInfo 文化,布尔 zip,布尔 notifyScriptLoaded)[0x00000] 在 System.Web.Handlers.ScriptResourceHandler.GetScriptResourceUrl(系统.Reflection.Assembly 程序集,System.String resourceName,System.Globalization.CultureInfo 文化,布尔 zip,布尔 notifyScriptLoaded)[0x00000] 在 System.Web.UI.ScriptReference.GetUrlFromName 的 0 处(System.Web.UI.ScriptManager scriptManager, IControl scriptManagerControl,Boolean zip) [0x00000] in :0 在 System.Web.UI.ScriptReference.GetUrl (System.Web.UI.ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) [0x00000] in :0 at System.Web.UI.ScriptManager。 RegisterScripts () [0x00000] in :0 在 System.Web.UI.ScriptManager.OnPagePreRenderComplete (System.Object sender, System.EventArgs e) [0x00000] in :0 在 System.Web.UI.Page.OnPreRenderComplete (System.EventArgs e) [0x0002a] 在 System.Web.UI.Page 的 /private/tmp/monobuild/build/BUILD/mono-2.6.1/mcs/class/System.Web/System.Web.UI/Page.cs:2157 .ProcessLoadComplete () [0x000bf] 在 /private/tmp/monobuild/build/BUILD/mono-2.6.1/mcs/class/System.Web/System.Web.UI/Page.cs:1654 在 System.Web.UI /private/tmp/monobuild/build/BUILD/mono-2.6.1/mcs/class/System.Web/System.Web.UI/Page.cs中的.Page.InternalProcessRequest()[0x001cb]:1536 在 System.Web.UI.Page.ProcessRequest(System.Web.HttpContext 上下文)[0x0005b] 在 /private/tmp/monobuild/build/BUILD/mono-2.6.1/mcs/class/System.Web/System。 Web.UI/Page.cs:1353
版本信息:Mono 运行时版本:2.6.1(tarball Thu Dec 17 10:19:23 MST 2009);ASP.NET 版本:2.0.50727.1433
似乎当我从我的根母版页中删除我的 ScriptManager 时,一切都运行良好(除了 JavaScript 期望它在那里)。
作为 Mono 和 MonoDev 的新手,我真的不知道从哪里开始调试,除了达到我目前所处的位置。