我目前正在尝试部署一个MVC 3应用程序我一直在我们的测试Web服务器上工作,并遇到一个主要问题加载一切正确。为尽可能多地提供这方面的信息,我正在做一个bin部署(我已经发送了所有对本地复制的引用),并且正在通过文件系统将web项目上的基本发布发布到服务器。我使用的组件包括:无法部署MVC 3项目与实体框架4.3.1和Oracle ODAC
实体框架4.3.1 甲骨文ODAC 11.2.0(4.112.3.0版)
此应用程序有2个实体框架对象,一个去一个SQL Server数据库和其他转到Oracle 10g数据库。我相信问题在于Entity Framework对象进入Oracle数据库。这是我第一个MVC 3项目和我的第一个部署(这里有很多“新”变量),所以我不确定是否缺少任何东西。我如何解决这个问题?在我的本地机器上,一切正常,只有当我将项目部署到服务器时,我才有问题。
事情我试过到目前为止:
我所有的控制器从基本控制器(BaseController),其中实体框架对象的实例生活继承。我无法进入从BaseController继承的任何控制器的Index视图,但HomeController继承自Controller。此页面正常工作。我已经尝试从其他控制器继承,并允许我进入索引视图,但返回到BaseController再次导致堆栈跟踪中的错误。该错误在哪里,我宣布我的实体框架对象将在Oracle数据库上线的情况发生:
protected internal RadixWebDataPRDX dbRadixData = new RadixWebDataPRDX();
我有Oracle.DataAccess.dll被复制,这还是引起了一个问题。
我的这个错误堆栈跟踪低于感谢:在“/ RadixMVC”应用
服务器错误。
无法找到所需的.Net Framework数据提供程序。它可能没有安装。
描述:执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪以获取有关该错误的更多信息以及源代码的位置。
异常详细信息:System.ArgumentException:无法找到请求的.Net Framework数据提供程序。它可能没有安装。
源错误:
在当前web请求的执行过程中生成未处理的异常。关于异常的来源和位置的信息可以使用下面的异常堆栈跟踪来标识。
堆栈跟踪:
[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.EntityClient.EntityConnection.GetFactory(String providerString) +34
[ArgumentException: The specified store provider cannot be found in the configuration, or is not valid.]
System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +63
System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +483
System.Data.EntityClient.EntityConnection..ctor(String connectionString) +77
System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) +40
System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) +17
RadixMVC.Models.Data.RadixWebDataPRDX..ctor() in C:\Users\862599\Documents\Visual Studio 2010\Projects\RadixMVC\RadixMVC\RadixMVC.Models.Data\RadixDataPRDX.Designer.cs:34
RadixMVC.Controllers.BaseController..ctor() in C:\Users\862599\Documents\Visual Studio 2010\Projects\RadixMVC\RadixMVC\RadixMVC\Controllers\BaseController.cs:17
RadixMVC.Controllers.AccountsPayableController..ctor() +29
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +98
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +241
System.Activator.CreateInstance(Type type, Boolean nonPublic) +69
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +67
[InvalidOperationException: An error occurred when trying to create a controller of type 'RadixMVC.Controllers.AccountsPayableController'. Make sure that the controller has a parameterless public constructor.]
System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +181
System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +77
System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +66
System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +209
System.Web.Mvc.<>c__DisplayClass6.<BeginProcessRequest>b__2() +50
System.Web.Mvc.<>c__DisplayClassb`1.<ProcessInApplicationTrust>b__a() +13
System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f) +7
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +23
System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +124
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +98
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +48
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8970356
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184
版本信息:Microsoft .NET Framework版本:4.0.30319; ASP.NET版本:4.0.30319.272
您是否在测试Web服务器上安装了ODAC? – 2012-07-18 15:22:01
我不相信。它需要成为?或者我只需要DLL文件来引用它? – 2012-07-18 15:28:31