1 Reply Latest reply: Dec 20, 2012 1:29 PM by 950117 RSS

    ODP.Net -- object reference not set to an instance of an object

      We are using odp.net provider in our asp.net web service (version 3.5) and getting wierd error. Below is the error

      System.NullReferenceException: Object reference not set to an instance of an object.
      at Oracle.DataAccess.Client.OracleConnection.BeginTransaction(IsolationLevel isolationLevel)

      I am not using transactions at all in the code but not sure why that method is being called internally. It is just a simple select query and command. On my development machine (windows 7),
      I have oracle 11g client and the related provider. I am building with that but the server has got oracle 10g client. I have been using binding redirect for that in the web.config file.

      The code works fine on my development machine but once I deploy it to the server, it is failing there. I tried to build this on other development machine (windows 2003 server) as well which has got 11g but once I deploy it to the main server, it is failing. Unfortunately I could find a link to download oracle 10g client and the related odp.net for windows 7.

      Can you please help why the error is being caught? I tried to explicitly start transaction as well. But the same issue exists.