System.InvalidCastException: Unable to cast object of type SqlDataProvider to type DataProvider

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 object of type 'M2Land.Modules.FlashImageRotator.SqlDataProvider' to type 'M2Land.Modules.FlashImageRotator.DataProvider'. at M2Land.Modules.FlashImageRotator.DataProvider.CreateProvider() in E:"Development"DotNetNuke"InstallArea"DotNetNuke_04.08.03_Source"Website"DesktopModules"M2Land.FlashImageRotator"Provider"DataProvider"SqlDataProvider"DataProvider.cs:line 55 at M2Land.Modules.FlashImageRotator.DataProvider..cctor() in E:"Development"DotNetNuke"InstallArea"DotNetNuke_04.08.03_Source"Website"DesktopModules"M2Land.FlashImageRotator"Provider"DataProvider"SqlDataProvider"DataProvider.cs:line 49 --- End of inner exception stack trace --- at M2Land.Modules.FlashImageRotator.DataProvider.Instance() at M2Land.Modules.FlashImageRotator.FlashImageRotatorController.GetFlashImageRotator(Int32 ModuleId) in E:"Development"DotNetNuke"InstallArea"DotNetNuke_04.08.03_Source"Website"DesktopModules"M2Land.FlashImageRotator"Provider"DataProvider"SqlDataProvider"FlashImageShowController.cs:line 111 at M2Land.Modules.FlashImageRotator.EditFlashImageRotator.Page_Load(Object sender, EventArgs e) in E:"Development"DotNetNuke"InstallArea"DotNetNuke_04.08.03_Source"Website"DesktopModules"M2Land.FlashImageRotator"EditFlashImageRotator.ascx.cs:line 68 --- End of inner exception stack trace ---

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

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

转载于:https://www.cnblogs.com/DotNetNuke/archive/2008/06/24/1229238.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值