加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – 无法找到请求的.Net Framework数据提供程序.它可能没

发布时间:2020-12-16 04:02:50 所属栏目:asp.Net 来源:网络整理
导读:完成ASP.NET MVC 3(找到 here)后,我尝试在线发布应用程序.我联系了托管公司,以确定是否可以托管MVC 3应用程序.但我不得不部署(dll文件)应用程序.因此,在遵循 hanselmans blog的一些步骤后,我会遇到以下错误: Unable to find the requested .Net Framework D
完成ASP.NET MVC 3(找到 here)后,我尝试在线发布应用程序.我联系了托管公司,以确定是否可以托管MVC 3应用程序.但我不得不部署(dll文件)应用程序.因此,在遵循 hanselmans blog的一些步骤后,我会遇到以下错误:

Unable to find the requested .Net Framework Data Provider. It may not be installed.
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.ArgumentException: Unable to find the
requested .Net Framework Data Provider. It may not be installed.

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:

[ArgumentException: Unable to find the requested .Net Framework Data
Provider. It may not be installed.]
System.Data.Common.DbProviderFactories.GetFactory(String
providerInvariantName) +1420503
System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String
name) +362
System.Data.Entity.Internal.LazyInternalConnection.Initialize() +49
System.Data.Entity.Internal.LazyInternalConnection.get_ConnectionHasModel()
+10 System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
+265 System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type
entityType) +17
System.Data.Entity.Internal.Linq.InternalSet1.Initialize() +62
System.Data.Entity.Internal.Linq.InternalSet
1.get_InternalContext()
+15 System.Data.Entity.Infrastructure.DbQuery1.System.Linq.IQueryable.get_Provider()
+37 System.Linq.Queryable.OrderByDescending(IQueryable
1 source,Expression1 keySelector) +66
MvcMusicStore.Controllers.HomeController.GetTopSellingAlbums(Int32
count) +420 MvcMusicStore.Controllers.HomeController.Index() +47
lambda_method(Closure,ControllerBase,Object[] ) +40
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase
controller,Object[] parameters) +17
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext
controllerContext,IDictionary
2 parameters) +188
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext
controllerContext,ActionDescriptor actionDescriptor,IDictionary`2
parameters) +27

任何帮助表示赞赏.

解决方法

根据我的经验,该错误意味着web.config中连接字符串上的providerName属性值不正确,或者字面上未安装提供程序.如果您的providerName设置为System.Data.SqlServerCe.4.0(SQL Server Compact),这在开发中并不常见,我可以保证您没有在Web主机上安装它;它仅在Visual Studio内部用于开发.您可能只需要将其更改为真正的SQL Server提供程序:System.Data.SqlClient.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读