We are using a .net application to connect to a Oracle db without installing any odp.net client ( just by having the necessary ora11g dlls in the same folder, method described here http://www.splinter.com.au/using-the-new-odpnet-to-access-oracle-from-c/ ).
And using this in the app.config file
<configSections>
<section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<system.data>
<DbProviderFactories>
<remove invariant="Oracle.DataAccess.Client" />
<add name="Oracle Data Provider for .NET" description="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.122.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>
</system.data>
<oracle.dataaccess.client>
<settings>
<add name="DllPath" value="R:\astech.office\trunk\bin\x86\Debug" />
<add name="bool" value="edmmapping number(1,0)" />
<add name="byte" value="edmmapping number(3,0)" />
<add name="int16" value="edmmapping number(5,0)" />
<add name="int32" value="edmmapping number(10,0)" />
<add name="int64" value="edmmapping number(19,0)" />
<add name="int16" value="edmmapping number(38,0)" />
<add name="int32" value="edmmapping number(38,0)" />
<add name="int64" value="edmmapping number(38,0)" />
</settings>
</oracle.dataaccess.client>
On one client's machine, after intalling ODAC 12.1, there's this error:
Impossible d'effectuer un cast d'un objet de type 'Oracle.DataAccess.Client.OracleParameter' en type 'Oracle.ManagedDataAccess.Client.OracleParameter'.
à Oracle.ManagedDataAccess.Client.OracleParameterCollection.AddRange(Array paramArray)
à SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.CreateStoredProcedureCallCommand(String storedProcedureToCall, DbParameter[] parameters)
à SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterCore.CallRetrievalStoredProcedure(String storedProcedureToCall, DbParameter[] parameters, DataSet dataSetToFill)
If they "replace the C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.Config file with one from another computer" (that's what they said) the error disappears.
It's obvious the runtime load the wrong factory, but why? I tried installing odac on other machines, and there's no problem, even if the machie.config file is the same. Do you have any suggestions on how to investigate this?