gpt4 book ai didi

asp.net - 无法找到请求的.Net Framework 数据提供程序。它可能没有安装

转载 作者:行者123 更新时间:2023-12-02 11:24:56 25 4
gpt4 key购买 nike

完成 ASP.NET MVC 3 教程(查找 here )后,我尝试在线发布该应用程序。我联系了托管公司,以确定是否可以托管 MVC 3 应用程序。我必须对(dll 文件)应用程序进行 bin 部署。因此,在执行 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 therequested .Net Framework Data Provider. It may not be installed.

Source Error:

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

Stack Trace:

[ArgumentException: Unable to find the requested .Net Framework DataProvider. It may not be installed.]
System.Data.Common.DbProviderFactories.GetFactory(StringproviderInvariantName) +1420503
System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(Stringname) +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(TypeentityType) +17
System.Data.Entity.Internal.Linq.InternalSet1.Initialize() +62 System.Data.Entity.Internal.Linq.InternalSet1.get_InternalContext()+15 System.Data.Entity.Infrastructure.DbQuery1.System.Linq.IQueryable.get_Provider() +37 System.Linq.Queryable.OrderByDescending(IQueryable1 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, IDictionary2 parameters) +188
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContextcontrollerContext, ActionDescriptor actionDescriptor, IDictionary`2parameters) +27

感谢任何帮助。

最佳答案

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

关于asp.net - 无法找到请求的.Net Framework 数据提供程序。它可能没有安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16165158/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com