The provider is not compatible with the version of Oracle client

前端 未结 27 1638
一生所求
一生所求 2020-11-22 05:37

I\'m trying to use the Oracle ODP.NET 11g (11.1.0.6.20) Instant Client on my ASP.net project as a Data Provider but when I run the aspx pag

27条回答
  •  北荒
    北荒 (楼主)
    2020-11-22 06:26

    I didn't go down the road of getting new DLL's. We had a bunch of existing projects that work perfectly fine and it was only my new project that was giving me headache so I decided to try something else.

    My project was using an internally developed Internal.dll that depended on Oracle.DataAccess.dll v4.112.3.0. For some reason, when publishing, Visual Studio always uploaded v4.121.0.0, even though it wasn't explicitly specified in any of the config files. That's why I was getting an error.

    So what I did was:

    1. Copied Internal.dll from one of the successfully running projects to my web site's /bin (just to be on the safe side).
    2. Copied Oracle.DataAccess.dll from one of the successfully running projects to my web site's /bin.
    3. Add Reference to both of them from my web site.
    4. Finally Oracle.DataAccess reference showed up in myWebSite.csproj, but it showed the wrong version: v4.121.0.0 instead of v4.112.3.0.
    5. I manually changed the reference in myWebSite.csproj, so it now read:

      
        False
        bin\Oracle.DataAccess.dll
       
      

提交回复
热议问题