3 Replies Latest reply: Mar 23, 2012 5:32 PM by gdarling - oracle RSS

    Can't run VM App using ODP.NET on my server - works fine on my client pc.

    918133
      I get .NET Runtime 2,0 Error - EventType clr20r3 - Event ID 5000 system.typeinit trying to run my application on a server. It works fine on client where developed.

      I'm migrating a VB app from "MS ODBC for Oracle" to ODP. The application works fine from my client PC (Win 7) . When I try to run from my server ( 2003) I get the system.typeinitialization error. On my client where I 'developed' the app (VS2010) I have ODP.NET (Oracle.DataAccess.dll) Ver 1.102.5.0 On my server where I am trying to deploy the application - I see Oracle.DataAccess.dll (v 10.1.0.200) in the folder c:\oracle\v1020\BIN and I see a folder c:\oracle\v1020\ODP.NET (however there is no BIN sub-folder here). On my client the dll is in \ODP.NET\BIN .

      In the registry on my client I have a HKLM\Software\oracle\ODP.NET\1.102.5.0
      In the registry on my server I just have HKLM\Software\Oracle\Key_Ora1020\ODP.Net with no sub key for version.

      I'm not sure what all of this means other than the app throws an exception on the server.

      fyi - I copy Oracle.DataAccess.dll from my project to the exe folder on the server - so it should be running 1.102.5.0

      Do I need my server ops team to install (reinstall) OPD>NET on the server? Can they install/re-instal without recreating the entire Oracle home? Anything I can do to try to figure out this issue? It is very confusing looking at all of the articles around this - seems like many have had this problem with no consensus on how to fix other than some issue with dll consistencies. I have to say - it seems like it should be easier than this !

      By the way - the app runs fine on the server & the client when using MS ODBC for Oracle connection. I'm changing primarily because I need unicode support. The app will need to run on the server in the production environment.

      Thanks, Marty
        • 1. Re: Can't run VM App using ODP.NET on my server - works fine on my client pc.
          gdarling - oracle
          Hi,

          It sounds as if you're trying to run the app on a machine that has a lower version of ODP than what the app was compiled with, and that doesn't work. You need to have >= the version you compiled with on the deployment machine.

          With respect to just copying your 10205 Oracle.DataAccess.dll over, there's more to it than that. You'll also need 10205 oraops10.dll. Additionally, it's not supported to run 10205 odp on 10201 client even if you copy over oraops10.dll as well and get it to work.

          Patching the 10201 client on the deployment target to 10205 should resolve this issue for you, and you do that by applying the 10205 database patch to the client machine.

          Also, remove Oracle.DataAccess.dll from the exe folder on the server, so the dll gets picked up out of the GAC instead.

          Hope it helps,
          Greg
          • 2. Re: Can't run VM App using ODP.NET on my server - works fine on my client pc.
            918133
            Thanks - I will give it a try - I thought it was something along those lines - however surprising to me that is is not compatible since they are in the same major release. Also - I'm confused about the Version nomenclature - On my client is show ODP.NET 1.102.5.0 and on my server Oracle.DataAccess.dll (v 10.1.0.200) . How does 1.102.5.0 translate to 10205 and v 10.1.0.200 translate to 10201 ? Also - when I looked on the for a distribution package 10201 ODP.NET (I was thinking I could install this on my client and use this as my reference) I could not find any such download.
            • 3. Re: Can't run VM App using ODP.NET on my server - works fine on my client pc.
              gdarling - oracle
              Ack, I read 10.1.0.200 to be 10.2.0.100. My bad there. 10.1? really? :)

              Anyway, the versioning scheme changed in 10.2.0.2.20: http://docs.oracle.com/html/E10927_01/InstallVersioningScheme.htm

              10102 ODP comes in the 10.1.0.1 client installl, but given that that version is no longer supported, it's no longer available for download.

              Really the best solution here is to upgrade the deployment target to a supported version of software, rather than finding an old version to compile with.

              HOWEVER, if you really want to compile with that old version, just copy it from the deployment machine and use that as a reference in your VS project. You won't be able to actually run it on your machine since you don't have 10.1 version of the rest of the stuff, but it should at least compile. At that point though, you'd be at the mercy of moving the app to the deployment machine and "hope it work", or at least do testing by fire on that machine.

              Hope it helps,
              Greg