2010-01-05 142 views
1

我正在玩我的Mac上的MonoDev,並希望看到它能夠如何運行我所從事的基本ASP.NET應用程序。ScriptManager導致服務器錯誤

我選擇了一個非常基本的站點,它有一些ASP.NET頁面,所有這些頁面都繼承了嵌套的母版頁和一些ASP.NET AJAX內容。該項目是.NET 2.0,我有適合ASP.NET AJAX 1.0設置的web.config。

在windows下沒有任何戲劇,因爲它非常簡單,所以我期望它在MonoDev中「工作」。問題是,當我運行使用內置的Web服務器MonoDev我得到以下異常:

服務器錯誤「/」應用程序不設置到對象

的實例

對象引用

描述:HTTP 500.錯誤處理請求。

堆棧跟蹤:在0 :

System.NullReferenceException:在System.Web.Handlers.ScriptResourceHandler.EncryptString(System.String多個)未設置爲一個對象 的實例對象引用[0x00000]在System.Web.Handlers.ScriptResourceHandler + RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl(System.Reflection.Assembly assembly,System.String resourceName,System.Globalization.CultureInfo culture,Boolean zip,Boolean notifyScriptLoaded)[0x00000] in: 0 at System.Web.Handlers.ScriptResourceHandler.GetScriptResourceUrl(System.Reflection.Assembly assembly,System.String resourceName,System.Globalization.CultureInfo文件,布爾zip,布爾notifyScriptLoaded)[0x00000]在:0 在System.Web.UI.ScriptReference.GetUrlFromName(System.Web.UI.ScriptManager scriptManager,IControl scriptManagerControl,布爾zip)[0x00000]中:0 在系統.Web.UI.ScriptReference.GetUrl(System.Web.UI.ScriptManager scriptManager,IControl scriptManagerControl,布爾zip)[0x00000]位於:0 at System.Web.UI.ScriptManager.RegisterScripts()[0x00000] in:0 System.Web.UI.ScriptManager.OnPagePreRenderComplete(System.Object sender,System.EventArgs e)[0x00000] in:0 at System.Web.UI.Page.OnPreRenderComplete(System.EventArgs e)[0x0002a] in/private /tmp/monobuild/build/BUILD/mono-2.6.1/mcs/class/System.Web/System.Web.UI/Page.cs:2157 at System.Web.UI.Page.ProcessLoadComplete()[0x000bf] in/private/tmp/monobuild/build/BU ILD/mono-2.6.1/mcs/class/System.Web/System.Web.UI/Page.cs:1654 at/private/tmp/monobuild中的System.Web.UI.Page.InternalProcessRequest()[0x001cb] /build/BUILD/mono-2.6.1/mcs/class/System.Web/System.Web.UI/Page.cs:1536 at System.Web.UI.Page.ProcessRequest(System.Web.HttpContext context)[ 0x0005b] in /private/tmp/monobuild/build/BUILD/mono-2.6.1/mcs/class/System.Web/System.Web.UI/Page.cs:1353

版本信息:Mono Runtime版本: 2.6.1(tarball Thu Dec 17 10:19:23 MST 2009); ASP.NET版本:2.0.50727.1433

看來雖然當我從我的根母版頁中刪除我的ScriptManager一切運行良好(除了期望它在那裏的JavaScript)。

對Mono來說是全新的& MonoDev我不知道從哪裏開始進行調試,而不是從現在開始。

回答

1

我在做一些單聲道測試時遇到了同樣的問題,問題在於scriptmanager不在form runat =「server」id =「form1」/ form標籤內。一旦添加了NULL異常就消失了。

+0

爲了記錄,這個解決方案沒有幫助,當我們有這個問題時,我們的ScriptManager已經在表單中。 – 2011-07-25 16:22:09