Underlying provider failed on Open. Can not find Oracle Home

Underlying provider failed on Open. Can not find Oracle Home

Postby r.m.saddler » Fri 22 Oct 2010 07:48

Hi,

I have an MVC project which works as expected on my local development Win2k3 machine. When I deploy it to our staging server I get the following error even though Oracle client is on the machine (all other ~50 web apps that talk to Oracle work fine). Can you give me any pointers please?

Thanks,

Rob.

FATAL : 10/22/2010 08:25:41 : UNHANDLED EXCEPTION CAUGHT BY MvcApplication_Error
System.Data.EntityException: The underlying provider failed on Open. ---> System.InvalidOperationException: Can not find Oracle home.
at Devart.Data.Oracle.OracleInternalConnection..ctor(u connectionOptions, OracleInternalConnection proxyConnection)
at Devart.Data.Oracle.b1.a(k A_0, Object A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionFactory.a(DbConnectionPool A_0, k A_1, DbConnectionBase A_2)
at Devart.Common.DbConnectionPool.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionPool.GetObject(DbConnectionBase owningConnection)
at Devart.Common.DbConnectionFactory.a(DbConnectionBase A_0)
at Devart.Common.DbConnectionClosed.Open(DbConnectionBase outerConnection)
at Devart.Common.DbConnectionBase.Open()
at Devart.Data.Oracle.OracleConnection.Open()
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
--- End of inner exception stack trace ---
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
at System.Data.EntityClient.EntityConnection.Open()
at System.Data.Objects.ObjectContext.EnsureConnection()
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at System.Data.Objects.ELinq.ObjectQueryProvider.b__2[TResult](IEnumerable`1 sequence)
at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
at System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source)
at HR.Web.Models.WebMembershipService.GetUser(String username) in W:\Intranet\ASPX4\HR\HR.Web.Models\Security\WebMembershipService.vb:line 182
at HR.Web.Models.WebSecurityServices.GetUser(String username) in W:\Intranet\ASPX4\HR\HR.Web.Models\Security\WebSecurityServices.vb:line 73
at HR.Web.Controllers.BaseController.EnsurePersistenceUserIsPopulated(String Username) in W:\Intranet\ASPX4\HR\HR.Web\Controllers\BaseController.vb:line 67
at HR.Web.Controllers.BaseController.Initialize(RequestContext requestContext) in W:\Intranet\ASPX4\HR\HR.Web\Controllers\BaseController.vb:line 42
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.b__4()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.b__0()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
r.m.saddler
 
Posts: 33
Joined: Thu 20 May 2010 08:57
Location: Wales, UK.

Postby r.m.saddler » Fri 22 Oct 2010 09:10

My bad sorry... my local server and staging servers have different oracle home names. I created a web.config.release transform to change the connection string and all worked fine.

Thanks!
r.m.saddler
 
Posts: 33
Joined: Thu 20 May 2010 08:57
Location: Wales, UK.


Return to dotConnect for Oracle