Thursday, March 15, 2007

ASP.NET 2.0 progress update

I've just been thinking about providing a periodical progress update on ASP.NET 2.0 support in Mono for users that don't track the svn commits and would like to know what will be coming with the next Mono release. So, from time to time (when something interesting/important changes in our ASP.NET implementation) I will blog a short summary of the changes here.

In the past 10 days there have been several significant changes committed to svn head, here's a summary:
  • Support for sitemap localization
  • Source code generated from the aspx and ascx files now implements the same split class model what MS.NET. It prevents problems with code-behind clashing with the generated class.
  • Application themes work properly for all controls now.
  • An initial support for asynchronous pages has been added
  • Fixes for the local resources (App_LocalResources) support. Mono now correctly handles local resource requests for custom controls. Resources are compiled on demand during the parsing phase.
  • XmlSiteMapProvider now supports custom site map providers for nodes.
  • App_Code support fixes. It is now possible to load custom providers, register tag prefixes whose implementations live in App_Code.

8 comments:

Jon said...

I haven't really been following asp.net 2.0 mono too closely as of late, but the last time I did try it, I was only partially successful, as things like auto-compilation of App_Code and what not were not implemented.

It looks like the next mono release should be a big step again for asp.net 2.0, and that really pleases me. I'd be truly excited if things like CommunityServer would run on linux/apache/mono, absolutely pleased.

So, keep up all your hard work, it's awesome, and very well worth it!

marek said...

Thanks for your comment Jon! ASP.NET 2.0 improved a lot in the past 3 months, that's true - in fact, we're capable of running some applications that use its features quite extensively. There are several missing pieces (WebParts and Web.Management being the most prominent ones), but the rest is working quite well - with some bugs popping here and there every now and then.
If you have a favorite ASP.NET 2.0 application and it doesn't run on Mono - please let me know and I'll see what needs to be changed in Mono in order to get the app working.

Tyberius Prime said...

Hello Marek,

I'm trying to get ScrewTurn Wiki (http://www.screwturn.eu/) running under Mono, and appart from some minor casing issues ( Bin/bin Web.Config/web.config), it appears my prime problem is with the App_Global-/App_LocalResources.

As far as I gathered ( and I'm no asp expert ) they should be made available in as Resources.Name, but all that get's me is a 'undeclared namespace, Resources.Name'. I've tried to compile App_GlobalResources by hand, changing my error message to 'can't pass null'...

So my question basically is:
Should this already work? Starting at what version ( I'm using the debian unstable packages right now)?
Or if not, is there a workaround?

Thank you,
so long
Tyberius Prime

Tyberius Prime said...

ok, using the current 'stable' installer from mono-project.com,
I'm up to
System.Resources.MissingManifestResourceException: Could not find any resource appropiate for the specified culture or its parents. Make sure "Resources.Messages.resources" was correctly embedded or linked into assembly "App_GlobalResources.1066f17d".
now...

Tyberius Prime said...

Ok, got around the last problem by replacing
manager = new ResourceManager("Resources.Messages", typeof(Resources.Messages).Assembly);
with
manager = new ResourceManager("Messages", typeof(Resources.Messages).Assembly);

and some path separator issues later,
the home page of the wiki is looking at me.

Unfortunatly, the other pages are using an attribute called meta:resourcekey, which apperantly is unknow to mono.

Google suggest it should be though:
http://lists.ximian.com/pipermail/mono-patches/2006-October/081700.html

I'll try to upgrade to the bleeding edge... wish me luck.

Tyberius Prime said...

On a side node, MaintainScrollPositionOnPostback isn't in Mono yet, though there appears to be a patch that was published in August 2006 http://lists.ximian.com/pipermail/mono-devel-list/2006-August/019610.html

For now, I'll just remove the attribute if I can get the meta:resourcekey to run.

Tyberius Prime said...

Sorry for spamming your blog ;).

Current SVN version doesn't handle meta:resourcekey either :(

marek said...

Hey Tyberius,
Basically, the answer to all your questions and problems is to use svn head of Mono for your ASP.NET 2.0 development. If you find something that doesn't work, visit http://mono-project.com/Bugs and file a bug on the ASP.NET WebForms module.