DotNetNuke Upgrade error: Cannot register or retrieve components until ComponentFactory.Container is set
So I was doing some testing of the DotNetNuke 5.1.2 release that came out last week, and ran into a little issue, with some investigation I found it wasn’t a DNN issue, but an issue with security on the operating system. Here’s the error message I found
System.InvalidOperationException: Cannot register or retrieve components until ComponentFactory.Container is set
At first I was like WTF is this, can’t say I have ever seen or heard of this error before. I started looking around and came across a forum post that mentioned the same error. Luckily for me the last post in the thread pointed out the issue.
“My problem was that I did not unzip the .VB files due to auto security settings . Right click on .zip file properties and remove restrictions and I was all rocking..
Don't know why I never had run into this before.. odd indeed :). Anyhow. All fine now.. Thanks!”
That wasn’t quite clear as to the resolution, but it was enough to get me going in the right direction. The server the sites are running on is Windows Server 2003, I noticed in the folder of my extracted files that all the VB files were missing, meaning that the OS had failed to extract them. To correct this right click on the ZIP file and choose properties, and look for the UNBLOCK option at the bottom of the properties window.
If you choose that option, then extract the contents of the file you should be able to upgrade DNN successfully. I’m not sure what Windows Update provided this new security, but I imagine that is the cause as I’ve tested this on two servers and never seen the issue before today.
Hopefully this post helps resolve the issue for anyone else who runs into it.