Global Data Management Forum

 View Only
Expand all | Collapse all

Error when Upgrading from Data Server Package 10.5 to 11.5

  • 1.  Error when Upgrading from Data Server Package 10.5 to 11.5

    Posted Thu November 03, 2022 09:38 AM
    I have a server that I've upgraded to have the 11.5 IBM DB2 Package instead of 10.5. As a result, the machine.config file has changed to the following db provider factories:
    <system.data>
    <DbProviderFactories>
    <add name="IBM DB2 .NET Data Provider 11.5.7000" invariant="IBM.Data.DB2.11.5.7000" description="IBM DB2 Data Provider 11.5.7000 for .NET Framework 4.0" type="IBM.Data.DB2.DB2Factory, IBM.Data.DB2.11.5.7000, Version=11.5.7000.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208" />
    <add name="IBM Informix .NET Data Provider 11.5.7000" invariant="IBM.Data.Informix.11.5.7000" description="IBM Informix Data Provider 11.5.7000 for .NET Framework 4.0" type="IBM.Data.Informix.IfxFactory, IBM.Data.Informix.11.5.7000, Version=11.5.7000.4, Culture=neutral, PublicKeyToken=7c307b91aa13d208" />
    </DbProviderFactories>
    </system.data>

    Now when I load my application, I receive the following error:
    "Unable to find the requested .Net Framework Data Provider. It may not be installed. [ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.]
    System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName) +1326077
    System.Data.Entity.Infrastructure.DependencyResolution.DefaultProviderFactoryResolver.GetService(Type type, Object key, Func`3 handleFailedLookup) +94

    Logically, this leads me to believe that now I must compile my application with a new EntityFramework DB2 data provider that has the 11.5 version, so that it matches what's on the server. However, when I install the EntityFramework.IBM.DB2 nuget package version 6.4.1, it's file version is 11.5, but the AssemblyVersion is still 10.5.5.6. This is because as this IBM article states : Microsoft Entity Framework 6.0 support "The IBM Data Server Entity Framework 6 provider file name is IBM.Data.EntityFramework and the assembly version of the provider is noted in the 10.5.5.6 format."

    When I run modify the web.config to look for the 11.5 package, I receive a "MajorVersion" mismatch error, because the 11.5 IBM DB2 tools on the server don't match the version of the compiled EntityFramework package (10.5). 

    It seems like I'm stuck in this catch 22. Are there any alternatives? What is the correct process for upgrading to the 11.5 server package?


    ------------------------------
    Kyle Vincent
    ------------------------------

    #DataManagementGlobal
    #DataServerDrivers


  • 2.  RE: Error when Upgrading from Data Server Package 10.5 to 11.5

    Posted Tue November 08, 2022 09:13 AM
    I resolved my own issue. It seems the 11.5 Installation was erasing the IBM.Data.DB2 dependent assembly and dbproviderfactories entries from the machine.config. Once I added those lines back in from the old config, we had no issues.

    ------------------------------
    Kyle Vincent
    ------------------------------