I've upgrading quite a few sites since my first DNN 2.1.2 , this one instance had been giving me headaches for a while, and had been stuck on 3.3.6 for a while. I spent last weekend making the upgrade happen. Here is some stuff I found out along the way...
First I had a module that was "Personalized HTML/Text" in the bin folder its DLL had a htmlP in it. The module originally offered token replacement before that was build into the core module. The long and short, the module wouldnt work. I ran a query to replace all the htmlP modules with the core HTML module, then deleted the htmlP module. 1 problem down...
the next problem was I needed to fully qualify a few System.Web references in the XML module (download.vb) 2 problems down...
Now the next problem "Executing Application Upgrades: 05.00.00 Error!" was a little harder to figure out. Checking my 05.00.00.log file I found it was empty. So I turned to the event log and found this..
Message: System.Data.SqlClient.SqlException: Violation of UNIQUE KEY constraint 'IX_DesktopModulePermission'. Cannot insert duplicate key in object 'dbo.DesktopModulePermission'. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Data.SqlDataProvider.AddDesktopModulePermission(Int32 portalDesktopModuleID, Int32 permissionID, Int32 roleID, Boolean allowAccess, Int32 userID, Int32 createdByUserID) at DotNetNuke.Security.Permissions.DesktopModulePermissionController.AddDesktopModulePermission(DesktopModulePermissionInfo objDesktopModulePermission) at DotNetNuke.Entities.Modules.DesktopModuleController.AddDesktopModuleToPortal(Int32 portalID, DesktopModuleInfo desktopModule, DesktopModulePermissionCollection permissions, Boolean clearCache) at DotNetNuke.Services.Upgrade.Upgrade.UpgradeToVersion_500() at DotNetNuke.Services.Upgrade.Upgrade.UpgradeApplication(Version version, Boolean writeFeedback)
Searching through the DesktopModulePermission table I found the row that was causing the error, the row had a RoleID = -1. Searching deeper I found this module was a user login module on a portal that didn't seem quite right. One of the tip offs was on the HOST/Portal page the portal showed -1 pages, and no alias(es), Looking into the portals table I saw these rows also had no admin. So basically they look like aborted portal creations. The Solution Delete the portals on the HOST/Portals Page.. One more problem solved.....
Now the last error "Error: Export Template is currently unavailable." on the HOST/Portals page. The solution was to open the ModuleControls table and update the location of the ControlSrc of Export template to 'DesktopModules/Admin/Portals/Template.ascx'.. Last problem solved... (this error SILENTLY FAILED so watch out)
The moral of the story DONT GIVE UP...
Another take away is perhaps in the next version someone can fix the upgrade script to delete this aborted portals... a portal with -1 pages can probably be safely deleted I would think without too much loss of critical data....
If anything in this post helped you... give me a thumbs up fist bump ...
|