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.

      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 On my server where I am trying to deploy the application - I see Oracle.DataAccess.dll (v 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\
      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

      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

          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,
          • 2. Re: Can't run VM App using ODP.NET on my server - works fine on my client pc.
            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 and on my server Oracle.DataAccess.dll (v . How does translate to 10205 and v 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 to be My bad there. 10.1? really? :)

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

              10102 ODP comes in the 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,