Error: Edit Content is currently unavailable.
DotNetNuke.Services.Exceptions.ModuleLoadException:The type initializer for'M2Land.Modules.FlashImageRotator.DataProvider' threw an exception.---> System.TypeInitializationException: The type initializer for'M2Land.Modules.FlashImageRotator.DataProvider' threw an exception.---> System.InvalidCastException: Unable to cast of type'M2Land.Modules.FlashImageRotator.SqlDataProvider' to type'M2Land.Modules.FlashImageRotator.DataProvider'. atM2Land.Modules.FlashImageRotator.DataProvider.CreateProvider() inE:"Development"DotNetNuke"InstallArea"DotNetNuke_04.08.03_Source"Website"DesktopModules"M2Land.FlashImageRotator"Provider"DataProvider"SqlDataProvider"DataProvider.cs:line55 at M2Land.Modules.FlashImageRotator.DataProvider..cctor() inE:"Development"DotNetNuke"InstallArea"DotNetNuke_04.08.03_Source"Website"DesktopModules"M2Land.FlashImageRotator"Provider"DataProvider"SqlDataProvider"DataProvider.cs:line49 --- End of inner exception stack trace --- atM2Land.Modules.FlashImageRotator.DataProvider.Instance() atM2Land.Modules.FlashImageRotator.FlashImageRotatorController.GetFlashImageRotator(Int32ModuleId) inE:"Development"DotNetNuke"InstallArea"DotNetNuke_04.08.03_Source"Website"DesktopModules"M2Land.FlashImageRotator"Provider"DataProvider"SqlDataProvider"FlashImageShowController.cs:line111 atM2Land.Modules.FlashImageRotator.EditFlashImageRotator.Page_Load( sender, EventArgs e) inE:"Development"DotNetNuke"InstallArea"DotNetNuke_04.08.03_Source"Website"DesktopModules"M2Land.FlashImageRotator"EditFlashImageRotator.ascx.cs:line68 --- End of inner exception stack trace ---

原因是这个项目是从StartKit迁移过来的,在App_Code下有同名的DataProvider和SqlDataProvider文件,所以反射时得到的类型不匹配。

删除App_Code中同名DataProvider和SqlDataProvider文件解决问题。
收藏 打印