Could not find the requested .net framework data provider. it cannot be installed

I am trying to connect to an informix database on a 64bit Windows 7 PC. I was able to establish a connection simply on a 32-bit computer, but when I tried to run it on a 64-bit computer, I received the above error. He is looking for the IBM.Data.Informix driver, but says that he cannot find it. I have two versions of this DLL in my GAC 3.0.0.2 and 9.0.0.2.

Does anyone know how to do this?

Thanks for any thoughts.

+1
source share
1 answer

I found a problem - I had to edit the machine.config file by adding the following lines -

<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v2.0.50727"> <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity name="IBM.Data.Informix" publicKeyToken="7c307b91aa13d208" culture=""/> <bindingRedirect oldVersion="2.81.0.0" newVersion="3.0.0.2"/> </dependentAssembly> <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity name="IBM.Data.Informix.3.0.0" publicKeyToken="7c307b91aa13d208" culture=""/> <bindingRedirect oldVersion="2.81.0.0" newVersion="3.0.0.2"/> <codeBase version="3.0.0.2" href="C:\Program Files\IBM\Informix\Client-SDK\bin\netf20\specific\IBM.Data.Informix.3.0.0.dll"/> </dependentAssembly> </assemblyBinding> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo=""> <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity name="IBM.Data.Informix" publicKeyToken="7c307b91aa13d208" culture=""/> <bindingRedirect oldVersion="2.81.0.0" newVersion="3.0.0.2"/> </dependentAssembly> <dependentAssembly xmlns="urn:schemas-microsoft-com:asm.v1"> <assemblyIdentity name="IBM.Data.Informix.3.0.0" publicKeyToken="7c307b91aa13d208" culture=""/> <bindingRedirect oldVersion="2.81.0.0" newVersion="3.0.0.2"/> <codeBase version="3.0.0.2" href="C:\Program Files\IBM\Informix\Client-SDK\bin\netf20\specific\IBM.Data.Informix.3.0.0.dll"/> </dependentAssembly> </assemblyBinding> </runtime> <connectionStrings> <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/> </connectionStrings> <system.data> <DbProviderFactories> <add name="Microsoft SQL Server Compact Data Provider" invariant="System.Data.SqlServerCe.3.5" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=3.5.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/> <add name="IBM Informix .NET Data Provider" invariant="IBM.Data.Informix" description="IBM Informix Data Provider for .NET Framework 2.0" type="IBM.Data.Informix.IfxFactory, IBM.Data.Informix, Version=3.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/> <add name="IBM Informix .NET Data Provider 3.0.0" invariant="IBM.Data.Informix.3.0.0" description="IBM Informix Data Provider 3.0.0 for .NET Framework 2.0" type="IBM.Data.Informix.IfxFactory, IBM.Data.Informix.3.0.0, Version=3.0.0.2, Culture=neutral, PublicKeyToken=7c307b91aa13d208"/> </DbProviderFactories> </system.data> 
0
source

Source: https://habr.com/ru/post/1399861/


All Articles