Critical error after Upgrade to 6.2.7

Apr 10, 2013 at 7:08 PM
Edited Apr 10, 2013 at 7:35 PM
Upgraded my site from 6.1.5 to 6.2.7 (AF5.0.3) and now have this error occurring.

A critical error has occurred.Unable to cast object of type 'Active.Modules.Forums.SettingsInfo' to type 'DotNetNuke.Modules.ActiveForums.SettingsInfo'.

I have changed Active.Modules.Forums type to DotNetNuke.Modules.ActiveForums in some of the Templates but need a bit of direction here please to track this down.
Apr 10, 2013 at 8:05 PM
I'm not sure why this would have been exposed after a DNN upgrade, but I can tell you the source code does not have any references to "Active.Modules.Forums" so anytime you see that, it's coming from old data (likely an old template).

It's likely stored in the templates table in the database. I don't have the code in front of me right now, so I can't provide any further guidance.
Apr 11, 2013 at 12:00 AM
Thanks JB. I checked all stored templates and could find no instance of Active.Modules.Forums. I'll see if I can catch the exact moment of the error. Only happens with a certain action. Then I have to run the instal as a repair.
Apr 11, 2013 at 10:51 AM
I'm not too good at reading the Stack Trace so some help here would be appreciated. I have several different Event reports. Here are two of the shorter ones that might help point to where i can find the errant code.

Further I have downloaded two different 5.0.3 files and I am wondering if I have upgraded with wrong one. I used ActiveForums_05.00.03_Install_DNN62.zip the other file is Forum_05.00.03_Install.zip

Error reports.

InnerException: Unable to cast object of type 'Active.Modules.Forums.SettingsInfo' to type 'DotNetNuke.Modules.ActiveForums.SettingsInfo'.

FileName:

FileLineNumber: 0

FileColumnNumber: 0

Method: DotNetNuke.Modules.ActiveForums.DataCache.MainSettings

StackTrace:

Message: System.InvalidCastException: Unable to cast object of type 'Active.Modules.Forums.SettingsInfo' to type 'DotNetNuke.Modules.ActiveForums.SettingsInfo'. at DotNetNuke.Modules.ActiveForums.DataCache.MainSettings(Int32 MID) at DotNetNuke.Modules.ActiveForums.Controls.ForumView.BuildForumView(Int32 ForumTemplateId, Int32 CurrentUserId, String ThemePath)

AND ---

Unable to cast object of type 'DotNetNuke.Modules.ActiveForums.SettingsInfo' to type 'Active.Modules.Forums.SettingsInfo'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: Unable to cast object of type 'DotNetNuke.Modules.ActiveForums.SettingsInfo' to type 'Active.Modules.Forums.SettingsInfo'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidCastException: Unable to cast object of type 'DotNetNuke.Modules.ActiveForums.SettingsInfo' to type 'Active.Modules.Forums.SettingsInfo'.]
Active.Modules.Forums.DataCache.MainSettings(Int32 MID) +238
Active.Modules.Forums.ForumsReWriter.OnBeginRequest(Object s, EventArgs e) +5274
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
Sep 4, 2014 at 8:37 AM
mervharvey: Did you solve this? I'm experiencing the same thing right now and I can't figure out why and what to do.

Thanks!
Sep 4, 2014 at 6:38 PM
Okay, here's an update from me so far (maybe others can benefit from these findings sometime):

Most, if not all, errors currently are from search bots hitting the file "/desktopmodules/activeforums/scripts/afscripts.ashx". That file doesn't even exist in the AF5 install package (or source code), but it existed in AF4. During install it was not removed.

I'm guessing that the afscripts.ashx is using the old DLL and that what's causing the error.

However, I have NO idea why Google and others are requesting (and failing) that file approx. 50-100 times per hour. I can't find any references in any templates.

Next step: I have renamed the file and will monitor what happens. It's obviously not a solution, but I don't know what else to do.

Please let me know if you have any ideas or comments about this! Any help would be greatly appreciated!
Sep 4, 2014 at 8:40 PM
@allanedk It was so far back that I can't remember how the issue resolved. Just that it has been resolved. Maybe just through keeping up with the upgrades to AF and DNN. I'm currently at AF 5.2.3 and DNN 7.2.2. Having said that I have a few new issues that have crept in but have so much going on outside of DNN atm to get into them.

FYI I looked for the afscripts.ashx file and it is still there. Will do the same and rename it and see if it has any bearing on one issue I'm having with the removal of all the old Active Social files and data. The AS dll goes off looking for forum posts for the journal.
Sep 4, 2014 at 9:05 PM
Thanks for getting back! I know it was an old post, but I was a bit desperate :) And I was hoping you remembered something.

I hope the renaming can help you as well.