ASP.NET 2.0 - Your car is no longer a car

http://blogs.ittoolbox.com/c/engineering/archives/007878.asp

ASP.NET 2.0 - Your car is no longer a car

I've been working with ASP.NET 2.0 ever since Beta 1, and I'd have to say that overall, it's been a good experience. I can't say enough about the raw power and usability of the ASP.NET framework and for the most part, there haven't been any major "Oh my gosh, what were they thinking?" type moments (well, the membership classes are a nightmare, but that's another story).

There IS one outstanding issue that I have encountered OVER and OVER during development, which is currently making very nervous about launching the .NET 2.0 projects we've got in the hopper. Many times (not EVERY time, just occasionally), when debugging an ASP.NET 2.0 project out of Visual Studio, or when modifying the files deployed on a production server, I've received an error similar to:

Unable to cast object of type 'ASP.masterpage_master' to type 'ASP.masterpage_master'

This error occurs when attempting to cast a master page to a specific type. Uhhhhh... Can't cast masterpage_master to masterpage_master??? Isn't that like saying "Sorry sir, I can't exchange euros for euros", or "Sorry sir, I just can't take the responsibility of assuming that your car is a car". To answer my own question - Yes, it is. This is a major glitch with the .NET 2.0 compilation model, and it also occurs when dynamically loading and casting user controls into pages that make use of a master page.

Many other people have been having this same issue, and the only real fix at this point is to... ahhhh... Modify a file that will force the application to recompile, or force a rebuild in Visual Studio. Not exactly a friendly workflow. The good news is that MS is working on a hotfix for the issue and it hopefully will be released pretty quickly. It makes me wonder though, how thoroughly these technologies are tested? This isn't an obscure feature, it's actually much closer to an EVERYDAY feature... I guess that's what you get for using a product right off the shelf.

Tags: ASP.NET 2.0

posted on 2006-03-16 16:12  signaldance  阅读(335)  评论(0编辑  收藏  举报