Hi,
I have a web application that works locally but not working once deployed to the test server. I got "Unrecognized section oracle.manageddataaccess.client" error when I tried to run the site which is sitting on the test server. Due to company policy I'm not allowed to install the instant client (or any additional software) on the test server and so I must include all dll's from bin and make it work from there. I'm using EF5 and the managed data access dll. I have the oracle.manageddataaccess.dll and Oracle.ManagedDataAccess.EntityFramework.dll in my bin. Can someone please tell me if there's something wrong with my web.config. How to make it work on the test server without the client installed? I thought managed odp.net should work without client? Thanks!
Right now I have the following on my web.config:
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="Oracle.ManagedDataAccess.Client" type="OracleInternal.Common.ODPMSectionHandler,Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</configSections>
<connectionStrings>
<add name="DefaultConnection" connectionString="data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<myhost>)(PORT=<myport>))(CONNECT_DATA=(SERVICE_NAME=<myservice>)));User Id=<userid>;Password=<pwd>;" providerName="Oracle.ManagedDataAccess.Client" />
<add name="Entities" connectionString="metadata=res://*/MY_Model.csdl|res://*/MY_Model.ssdl|res://*/MY_Model.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string="DATA SOURCE=<myservice>;PASSWORD=pwd;PERSIST SECURITY INFO=True;USER ID=USERID"" providerName="System.Data.EntityClient" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="Oracle.ManagedDataAccess.EntityFramework.OracleConnectionFactory, Oracle.ManagedDataAccess.EntityFramework">
<parameters>
<parameter value="v11.0" />
</parameters>
</defaultConnectionFactory>
Under assembly binding:
<dependentAssembly>
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.121.1.0" newVersion="4.121.1.0" />
</dependentAssembly>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<publisherPolicy apply="no" />
<assemblyIdentity name="Oracle.ManagedDataAccess.Client" publicKeyToken="89b483f429c47342" culture="neutral" />
<bindingRedirect oldVersion="4.121.0.0 - 4.65535.65535.65535" newVersion="4.121.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="EntityFramework" publicKeyToken="b77a5c561934e089" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.4.0.0" newVersion="4.4.0.0" />
</dependentAssembly>
</assemblyBinding>
<system.data>
<DbProviderFactories>
<remove invariant="Oracle.ManagedDataAccess.Client" />
<add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver" type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>
</system.data>
<Oracle.ManagedDataAccess.Client>
<version number="*">
<dataSources>
<dataSource alias="oracle" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=<our hostserver>)(PORT=<our port>))(CONNECT_DATA=(SERVICE_NAME=<our service>))) " />
</dataSources>
</version>
</Oracle.ManagedDataAccess.Client>