Connect to Oracle

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: }
 
M

Miha Markic

Hi,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top