I'm experiencing the same recurring error on both my DNN 4.5.0 (source version) development and a DNN 4.5.0 (install version) test site. While debugging another problem with the core module upgrade process, I also took a look at this error. I can contribute a bit toward understanding where the problem is occuring and how to stop the exceptions from being generated, but still can't see WHY the missing method exception is being thrown in the first place:
1. When during the process of installing/upgrading a module, the PaInstaller will place a message (ProcessorType="DotNetNuke.Entities.Modules.EventMessageProcessor" and ProcessorComand="UpgradeModule") into the EventQue so that it will be handled immediately after the application restarts following the installation of the module's files. The BusinessControllerClass, DesktopModuleId, and a list of the upgrade versions are also passed in the event message
2. Following application restart, the event message is pulled from the EventQue and passed onto the UpgradeModule method (in Modules.EventMessageProcessor.vb).
3. The IUpgradeable interface of the particular module (implemented as the function UpgradeModule in the BusinessControllerClass) is then called for each version in the list of upgrade versions.
4. In the case of the Event module, the only version of interest is 03.03.02 in which case entries for earlier version module controls (with keys 'Month', 'List', 'Week', 'Detais' and 'MyEnrollments' are removed from the ModuleControls table - my guess is that they are now being loaded dynamically into Events.ascx. In order to obtain the ModuleControlID for those controls to be removed, the following code is used:
Dim objModuleControls As New DotNetNuke.Entities.Modules.ModuleControlController
Dim objModuleControl As New DotNetNuke.Entities.Modules.ModuleControlInfo
' Delete Month Control
objModuleControl = objModuleControls.GetModuleControlByKeyAndSrc(objModuleDefinition.ModuleDefID, "Month", "DesktopModules/Events/EventMonth.ascx")
objModuleControls.DeleteModuleControl(objModuleControl.ModuleControlID)
5. For some reason, the GetModuleControlByKeyAndSrc method is not being found. It is still available in DNN 4.5.0 but is now a shared/static method. In fact, all methods of the ModuleControlsController are now shared rather than instance. Even so (not withstanding the warning that VS2005 will show when referencing a shared method by way of a class instance rather than the class name), it should be able to be called through a class instance (objModuleControls).
CAN ANYONE SHED SOME LIGHT AS TO WHY THIS IS THROWING THE METHOD NOT FOUND ERROR??
6. Because of the error thrown in UpgradeModule, the processing of the UpgradeModule message in the EventQue is never completed and the message never has its 'IsCompleted' field set to true in the EventQue table.
7. Therefore, each time the DNN application is restarted, another attempt will be made to process the UpgradeModule message which again fails generating yet another error for the log.
8. To get these errors from being continually generated, I simply went into the EventQue table in the DNN database and set the IsCompleted column for this particular event message (look in the Attributes column for the 'Events.EventsController' BusinessControllerClass) to 'True'. I'm not sure what problems having the outdated entries in the ModuleControls table will cause if they are not deleted, but in my case I found that they had been deleated earlier during one of the Events module beta installs on both my development and test installs.
9. Question for those who have followed this long thread all the way through: In addition to the 'method not found' exception being logged on each application start, did anyone get the following General Exception sometime prior to the install upgrade of the Events module?
InnerException: Cannot insert the value NULL into column 'ExceptionMessage', table 'DNN4.dbo.dnn_EventQueue'; column does not allow nulls. INSERT fails. The statement has been terminated.