I have developed a new application that uses Entity Framework to access an Oracle database. This is working as expected locally, using the latest version of ODP.NET. I am now trying to deploy this application on a production server running many other legacy applications. Ideally I would like my new application to make use of its own ODP.NET / Oracle dlls and not have to change the existing Oracle install on the prod server.
I followed this guide:
<a href="http://jeremybranham.wordpress.com/2011/04/25/oracle-instant-client-with-odp-net/" rel="nofollow">http://jeremybranham.wordpress.com/2011/04/25/oracle-instant-client-with-odp-net/</a>
Which seems to have had some success based on the comments.
However, I get the following exception when attempting to create the entities object:
<strong>Outer Exception</strong>
<strong>Inner Exception</strong>
I followed this guide:
<a href="http://jeremybranham.wordpress.com/2011/04/25/oracle-instant-client-with-odp-net/" rel="nofollow">http://jeremybranham.wordpress.com/2011/04/25/oracle-instant-client-with-odp-net/</a>
Which seems to have had some success based on the comments.
However, I get the following exception when attempting to create the entities object:
<strong>Outer Exception</strong>
Code:
Exception has been thrown by the target of an invocation.
<strong>Inner Exception</strong>
Code:
The type initializer for 'Oracle.DataAccess.Client.OracleClientFactory' threw an exception.
at System.RuntimeFieldHandle.GetValue(RtFieldInfo field, Object instance, RuntimeType fieldType, RuntimeType declaringType, Boolean& domainInitialized)
at System.Reflection.RtFieldInfo.InternalGetValue(Object obj, Boolean doVisibilityCheck, Boolean doCheckConsistency)
at System.Reflection.RtFieldInfo.GetValue(Object obj)
at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.EntityClient.EntityConnection..ctor(String connectionString)
at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString)
at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
at MyAppMVC.Models.DataModels.STSProcedureEntities..ctor()
at MyAppMVC.Services.MyService.GetPersons(String lastName)