views:

326

answers:

1

I'm playing around with MonoDev on my mac and wanting to see how well it can run basic ASP.NET applications which I've worked on.

I chose a very basic site, it's got a handful of ASP.NET pages, all of which inherit nested master pages and some ASP.NET AJAX stuff. The project is .NET 2.0 and I have the web.config set appropriately for ASP.NET AJAX 1.0.

Under windows this runs without any dramas and because it's so simple I expected it to "just work" in MonoDev too. The problem is that when I run using the built-in web server for MonoDev I get the following exception:

Server Error in '/' Application

Object reference not set to an instance of an object

Description: HTTP 500. Error processing request.

Stack Trace:

System.NullReferenceException: Object reference not set to an instance of an object at 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 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 culture, Boolean zip, Boolean notifyScriptLoaded) [0x00000] in :0 at System.Web.UI.ScriptReference.GetUrlFromName (System.Web.UI.ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) [0x00000] in :0 at 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 at 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/BUILD/mono-2.6.1/mcs/class/System.Web/System.Web.UI/Page.cs:1654 at System.Web.UI.Page.InternalProcessRequest () [0x001cb] in /private/tmp/monobuild/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

Version information: Mono Runtime Version: 2.6.1 (tarball Thu Dec 17 10:19:23 MST 2009); ASP.NET Version: 2.0.50727.1433

It seems though that when I remove my ScriptManager from my root master page everything runs fine (well except for the JavaScript which expects it to be there).

Being completely new to Mono & MonoDev I don't really know where to start with debugging other than getting to the point I'm currently at.

A: 

I had the same problem when doing some Mono testing and the problem was the scriptmanager was not inside the form runat="server" id="form1" /form tags. Once that was added the NULL exception went away.

brucedcarpenter