Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何解决';未能找到或加载已注册的.Net Framework数据提供程序';?_C#_.net - Fatal编程技术网

C# 如何解决';未能找到或加载已注册的.Net Framework数据提供程序';?

C# 如何解决';未能找到或加载已注册的.Net Framework数据提供程序';?,c#,.net,C#,.net,我正在尝试启动一个在本地IIS实例中开发的.NETC#应用程序。到目前为止,我一直在使用VS2013中使用IISExpress运行该应用程序 当我创建一个虚拟目录并访问webapp时,我看到了以下错误: Line 61: using (OlgaDbModelEntity ctx = new OlgaDbModelEntity()) Line 62: { Line 63: cultureId = ctx.SYSTEM_

我正在尝试启动一个在本地IIS实例中开发的.NETC#应用程序。到目前为止,我一直在使用VS2013中使用IISExpress运行该应用程序

当我创建一个虚拟目录并访问webapp时,我看到了以下错误:

Line 61:             using (OlgaDbModelEntity ctx = new OlgaDbModelEntity())
Line 62:             {
Line 63:                 cultureId = ctx.SYSTEM_OPTION.Where(c => c.OPTIONCODE == AppConstants.DefaultCulture).Select(c => c.OPTIONVALUE.Trim()).FirstOrDefault();
Line 64:             }
Source File: c:\code\OlgaWeb\Cat.Olga.Server.BussinessLogic\Culture\CultureHelper.cs    Line: 63 

Stack Trace: 


 [ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.]
 System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) +2241146
  System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +151
  System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +575
  System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config) +144
  System.Data.Entity.Internal.LazyInternalConnection.Initialize() +95
  System.Data.Entity.Internal.LazyInternalConnection.CreateObjectContextFromConnectionModel() +16
  System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +269
  System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) +26
  System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() +71
  System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext() +21
  System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider() +44
  System.Linq.Queryable.Where(IQueryable`1 source, Expression`1 predicate) +85
  Cat.Olga.Server.BussinessLogic.Culture.CultureHelper.GetApplicationDefaultCulture() in c:\code\OlgaWeb\Cat.Olga.Server.BussinessLogic\Culture\CultureHelper.cs:63
  Cat.Olga.Server.BussinessLogic.Application.ApplicationLogic.Cat.Olga.Server.BussinessLogic.Interface.IApplicationLogic.GetApplicationDefaultCulture() in c:\code\OlgaWeb\Cat.Olga.Server.BussinessLogic\Application\ApplicationLogic.cs:283
  Cat.Olga.Client.App.MvcApplication.OlgaApplicationStart() in c:\code\OlgaWeb\Cat.Olga.Client.App\Global.asax.cs:114
  Cat.Olga.Client.App.MvcApplication.Application_Start() in c:\code\OlgaWeb\Cat.Olga.Client.App\Global.asax.cs:108

 [HttpException (0x80004005): Failed to find or load the registered .Net Framework Data Provider.]
  System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +12951237
  System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +175
  System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
  System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
  System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

 [HttpException (0x80004005): Failed to find or load the registered .Net Framework Data Provider.]
  System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12968244
  System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
  System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12807949
My Web.config有:

<DbProviderFactories>
        <!-- Remove in case this is already defined in machine.config -->
        <remove invariant="Oracle.DataAccess.Client"/>
        <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
</DbProviderFactories>