Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. Odp.Net and WCF (x64) [Solved]

Odp.Net and WCF (x64) [Solved]

Scheduled Pinned Locked Moved WCF and WF
helpcsharpdotnetoraclewcf
6 Posts 2 Posters 5 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    V 0
    wrote on last edited by
    #1

    I'm having a problem with data access to Oracle via Odp.Net in WCF on a x64 machine (Win 2008 R2 Standard). The weird thing is that the component is working in a windows environment (a windows application on that same server), no problem, but if I call the exact same code via a webservice, nothing happens. Not even an error message. So far I browsed google en found suggestions on - Machine.config - add assembly via web.config - Configure a trust via the OraProvCfg.exe tool from Oracle - Try to copy the Oracle.DataAccess.dll locally (Here the service will crash : Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.) I'm pretty sure that it is some config in IIS or something like that, but can't find the cause. Has anyone had the same issue? How did you solve it? Many thanks in advance. [Solution] Maybe in combination with some of the above, I had to add version 4 of the dll (for .Net Framework 4) to the GAC like below. I'm not sure why a win client wouldn't have the same problem though. I think it might be linked to the app pool in IIS.

    C:\oracle\odp.net\bin\4\OraProvCfg.exe /action:gac /providerpath:C
    :\oracle\odp.net\bin\4\Oracle.DataAccess.dll
    INFO: c:\oracle\odp.net\bin\4\oracle.dataaccess.dll is registered successfully i
    n GAC.

    Additional info always welcome ;)

    V.

    F 1 Reply Last reply
    0
    • V V 0

      I'm having a problem with data access to Oracle via Odp.Net in WCF on a x64 machine (Win 2008 R2 Standard). The weird thing is that the component is working in a windows environment (a windows application on that same server), no problem, but if I call the exact same code via a webservice, nothing happens. Not even an error message. So far I browsed google en found suggestions on - Machine.config - add assembly via web.config - Configure a trust via the OraProvCfg.exe tool from Oracle - Try to copy the Oracle.DataAccess.dll locally (Here the service will crash : Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.) I'm pretty sure that it is some config in IIS or something like that, but can't find the cause. Has anyone had the same issue? How did you solve it? Many thanks in advance. [Solution] Maybe in combination with some of the above, I had to add version 4 of the dll (for .Net Framework 4) to the GAC like below. I'm not sure why a win client wouldn't have the same problem though. I think it might be linked to the app pool in IIS.

      C:\oracle\odp.net\bin\4\OraProvCfg.exe /action:gac /providerpath:C
      :\oracle\odp.net\bin\4\Oracle.DataAccess.dll
      INFO: c:\oracle\odp.net\bin\4\oracle.dataaccess.dll is registered successfully i
      n GAC.

      Additional info always welcome ;)

      V.

      F Offline
      F Offline
      fingerss5
      wrote on last edited by
      #2

      Try using multilayer architecture. Then wcf will not recognise the drivers just the usual classes

      V 2 Replies Last reply
      0
      • F fingerss5

        Try using multilayer architecture. Then wcf will not recognise the drivers just the usual classes

        V Offline
        V Offline
        V 0
        wrote on last edited by
        #3

        Are you talking about n-tier? We do use that. We have a DataAccess assembly which is the sole dll that talks to Odp.net, but somehow Odp.Net itself complained about it. let me know if I misunderstood what you were traying to say.

        V.

        F 1 Reply Last reply
        0
        • V V 0

          Are you talking about n-tier? We do use that. We have a DataAccess assembly which is the sole dll that talks to Odp.net, but somehow Odp.Net itself complained about it. let me know if I misunderstood what you were traying to say.

          V.

          F Offline
          F Offline
          fingerss5
          wrote on last edited by
          #4

          Yes n-tier. Ok can you put the dll in bin folder add reference it from web.config. Its not pool because you are using .net4 pool

          V 1 Reply Last reply
          0
          • F fingerss5

            Yes n-tier. Ok can you put the dll in bin folder add reference it from web.config. Its not pool because you are using .net4 pool

            V Offline
            V Offline
            V 0
            wrote on last edited by
            #5

            mmm I tried that solution. Did you read that this topic was already solved by adding the correct assembly to the GAC with a tool that Oracle provided? thanks for the effort though.

            V.

            1 Reply Last reply
            0
            • F fingerss5

              Try using multilayer architecture. Then wcf will not recognise the drivers just the usual classes

              V Offline
              V Offline
              V 0
              wrote on last edited by
              #6

              Just saw somebody voted you down. Just for the record, I didn't do that.

              V.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups