Connect to Oracle

  • Thread starter Thread starter Kartik
  • Start date Start date
K

Kartik

Hi

I have Oracle 9i client installed on my system. I'm able
to access the Oracle database using normal applications
but failing when I try to access the database through the
ASP.NET web application. Please find the error in
following message.

Server Error in '/WebApplication10' Application.
-----------------------------------------------------------
---------------------

Could not create an environment: OCIEnvCreate returned -1.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and where
it originated in the code.
Error is thrown exactly at connection open.
Anybody have any idea.

Thanks in advance
Kartik



Exception Details: System.Exception: Could not create an
environment: OCIEnvCreate returned -1.

Source Error:


Line 79: OracleConnection conn =
new OracleConnection( "Data Source=database;User
ID='admin';Password='sample'" );
Line 80:
Line 81: conn.Open();
Line 82: conn.Close();
Line 83: }
 
Hi,

Set NTFS access permissions on oci.dll in oracle bin folder for aspnet
account (read).
 
Back
Top