Showing posts with label IIS. Show all posts
Showing posts with label IIS. Show all posts

Tuesday, May 15, 2012

Using ODAC with EF4 via WCF

Oracle Data Access Components (ODAC) 11.2 Release 4 (11.2.0.3.0) with Oracle Developer Tools for Visual Studio includes support for Entity Framework and LINQ. Implementation is simple, however when I called the query from a WCF service I got the error:

System.ArgumentException was unhandled by user code
  Message=The specified store provider cannot be found in the configuration, or is not valid.
  Source=System.Data.Entity
  StackTrace:
       at System.Data.EntityClient.EntityConnection.GetFactory(String providerString)
       at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
       at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName)
       ...
  InnerException: System.ArgumentException
       Message=Unable to find the requested .Net Framework Data Provider.  It may not be installed.

A bit of research discovered that 32-Bit Applications are disabled by default in the IIS Application Pool. As soon as I changed Enable 32-Bit Applications to True everything worked fine.