Thursday, September 21, 2006

DotNetNuke (DNN) upgrade and the infamous Could not load type 'DotNetNuke.Common.Global'

I manage a DNN site which is currently running on DNN 3.1.1 hosted at WebHost4Life. I have a local backup of the site on my home server running on Win2003 and SQL 2005. I tried to upgrade the local copy to the current release 4.3.5 using the xxx_Install.zip and on the first try I received the infamous "Could not load type 'DotNetNuke.Common.Global'" error. I'm referring to it as infamous because there are a lot of howls posted over at the DNN forums site with very few real suggestions of getting around the problem.

To test the upgrade, I backed up my copy of web.config, used the development.config as a starting point, and put the correct SQL provider settings in. I used a diff tool to copy directly from the xxx_Install.zip to the website folder - replacing everything, removing what wasn't there any more and skipping the *.vb source files. When I first hit the site, I received the could not load type error. After hunting around on the web and finding little or no helpful information (such as this thread), I began trying to diagnose it myself.

Judging by the initial quick error, I figured it was something very basic with the configuration. However, I noticed in the event log details on the server that it seemed to be getting past default.aspx and was down in /install/install.aspx when it died. Hmm...remembering that all the modules are in zips now and get automagically deployed, I tried something whimsical - deleting all the zips (maybe it was trying to load these?) and voila - it got further along.

At this point, I tried a couple of things in quick succession (it was getting late last night). First, uncomment the enable medium trust  - the problem w/ non-colorizing IDEs such as Notepad is that comment markers are easy to miss. Second, I got a different error about missing a *.vb file. I recalled some discussions over on ScottGu's blog about the compilation model being different under 2.0 so on a whim I went back to the xxx_Install.zip and copied over all the *.vb files. Note, this is my "pseudo-production" server - I purposely did not install VS.NET to avoid the usual issues of "it works on my development machine". After that, the site came up minus the custom modules and the skins.

It's a start at least and I think I've stumbled onto something regarding what is going on during an upgrade. Unfortunately, I don't really have the time or luxury of building/rebuilding this to test/diagnose the issue further. I'm a big fan of cookbook-style guides so maybe I'll get to one soon. I hope to finish my testing/eval and get the site pushed out to the hosting company by the weekend. Also, this just shows me that I've got to spend some dedicated time working with 2.0, heck 3.0 is already starting to pop up!

Original post

No comments:

Post a Comment