Problem Upgrading for DNN 4.9.5 to DotNetNuke 6x

During an update from DNN 4.9.5 to DNN 6x we experienced:

All pages with HTML blank when logged out, but show this error logged in.

image

Error: Services is currently unavailable.DotNetNuke.Services.Exceptions.ModuleLoadException: The type initializer for ‘DotNetNuke.Modules.Html.DataProvider’ threw an exception. —> System.TypeInitializationException: The type initializer for ‘DotNetNuke.Modules.Html.DataProvider’ threw an exception. —> System.InvalidCastException: Unable to cast object of type ‘DotNetNuke.Modules.HTML.SqlDataProvider’ to type ‘DotNetNuke.Modules.Html.DataProvider’. at DotNetNuke.Modules.Html.DataProvider.CreateProvider() — End of inner exception stack trace — at DotNetNuke.Modules.Html.WorkflowStateController.GetWorkflows(Int32 PortalID) at DotNetNuke.Modules.Html.HtmlTextController.GetWorkflow(Int32 ModuleId, Int32 TabId, Int32 PortalId) at DotNetNuke.Modules.Html.HtmlModule.OnInit(EventArgs e) — End of inner exception stack trace —

Solution

In our case, the upgrade left 2 things behind that DNN 6 did not like.

  1. in the app_code directory, we deleted the ‘HTML’ folder (since it does not seem that it was in use anymore and was potentially conflicting with new html module code)
  2. in web.config, I removed the following line in the <Codesubdirectories> section
    <add directoryName="HTML" />

Save and you are done.

2 thoughts on “Problem Upgrading for DNN 4.9.5 to DotNetNuke 6x

  1. I think your website is still broken. Trying to download a trial of your login module, but link takes me to a page with no download options. Also finding lots of empty pages. Suprised you didn’t upgrade to DNN6 on a test server; strange thing to do on your production site.

    • Thanks for the comment.
      That article is actually from an upgrade to one of the many dotnetnuke sites we host in our own data center. We are not aware of any access issues on our site, so we would love to know the links / pages that are failing you if you have a minute to update us with that information.

      As for our site… we do tend to jump right in when it comes to things that we know we can fix quickly. We have the ability to snapshot our site and database and roll back and forward easily, so there was never any real threat. End of the day, our site was down for less than 1 hour, and we only had 3 custom modules to update. None of which is going to be the cause of your experience here, which is why we are so keen to know about your troubles.

Leave a Reply

Your email address will not be published. Required fields are marked *