Big problem with Oracle in web environment

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I just started having a problem with Oracle 9.2.0.4. When unit testing my dlls I have no problems, but when I call the dll's from a web app I get this error

System.NullReferenceException: Object reference not set to an instance of an object.

After stepping through the code is isolated it to when I try to access the OracleDataReader instance variable. So I created a new web project and in the page load event added this cod

OracleDataReader dr = null;
int x = 1
x++

Yes, I have the reference and using statement. So I run in the debugger and watch dr. No matter what line I am on dr show

dr = <undefined value

Not null, but undefined! Like I said, when I test with NUnit with no web app this all works. Why would a web project do this? I get the exception even if I run from the browser directly to the site without VS

I have VS.Net 200
Win XP all service packs and patche
Oracle 9.2.0.

Regards
Paul Speranz
 
If I use a connection object and try to open it I get this

Unable to load DLL (oci.dll)

But only when run from a web app.












Paul Speranza said:
I just started having a problem with Oracle 9.2.0.4. When unit testing my
dlls I have no problems, but when I call the dll's from a web app I get this
error.
System.NullReferenceException: Object reference not set to an instance of an object.

After stepping through the code is isolated it to when I try to access the
OracleDataReader instance variable. So I created a new web project and in
the page load event added this code
OracleDataReader dr = null;
int x = 1;
x++;

Yes, I have the reference and using statement. So I run in the debugger
and watch dr. No matter what line I am on dr shows
dr = <undefined value>

Not null, but undefined! Like I said, when I test with NUnit with no web
app this all works. Why would a web project do this? I get the exception
even if I run from the browser directly to the site without VS.
 
Paul Speranza said:
If I use a connection object and try to open it I get this

Unable to load DLL (oci.dll)

But only when run from a web app.

That's a security problem. The account that teh web site runs under (ASPNET
by default) must be able to read from the [OracleHome]\bin directory, and
the [OracleHome]\bin directory must be in the path.

David
 
Back
Top