Below is the error message I am receiving on a production server with the
Oracle 9.2 client installed. However, on a Oracle 9.0 client installation on
the development server the problem does not occur.
System.Exception: Could not create an environment: OCIEnvCreate returned -1.
This occurs when trying to connect.
using System.Data.OracleClient
this.connection = new OracleConnection("Data Source=" +
ConfigurationSettings.AppSettings["db_orac"] + ";User ID=" +
ConfigurationSettings.AppSettings["db_user"] + ";Password=" +
ConfigurationSettings.AppSettings["db_pass"] + ";");
this.connection.Open();
this.command = new OracleCommand();
this.command.Connection = this.connection;
ds = new DataSet();
command.Parameters.Clear();
command.CommandText = "MyTableSpace.MyPackage.get_list";
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add(new OracleParameter("io_cursor",
OracleType.Cursor)).Direction = ParameterDirection.Output;
this.da = new OracleDataAdapter(this.command);
this.da.Fill(ds,"List");
this.connection.Close();
I am desperately trying to find a solution. Any help would be much
appreciated!!
Regards,
Ben 4 8181
Ben:
This might be a permissions problem as the asp.net worker process needs
access to the Oracle directory. Try granting it read access and see if that
helps.
"ben" <be********@yahoo.com> wrote in message
news:ed**************@TK2MSFTNGP09.phx.gbl... Below is the error message I am receiving on a production server with the Oracle 9.2 client installed. However, on a Oracle 9.0 client installation
on the development server the problem does not occur.
System.Exception: Could not create an environment: OCIEnvCreate
returned -1. This occurs when trying to connect.
using System.Data.OracleClient this.connection = new OracleConnection("Data Source=" + ConfigurationSettings.AppSettings["db_orac"] + ";User ID=" + ConfigurationSettings.AppSettings["db_user"] + ";Password=" + ConfigurationSettings.AppSettings["db_pass"] + ";"); this.connection.Open();
this.command = new OracleCommand(); this.command.Connection = this.connection;
ds = new DataSet();
command.Parameters.Clear(); command.CommandText = "MyTableSpace.MyPackage.get_list"; command.CommandType = CommandType.StoredProcedure; command.Parameters.Add(new OracleParameter("io_cursor", OracleType.Cursor)).Direction = ParameterDirection.Output;
this.da = new OracleDataAdapter(this.command); this.da.Fill(ds,"List");
this.connection.Close();
I am desperately trying to find a solution. Any help would be much appreciated!!
Regards,
Ben
Hi ben,
I think Elliot is right - just give aspnet process enough privileges to
oracle's bin directory (and directories below).
Or run aspnet app under another account:
Just put a line into
web.config file somewhere under
<system.web> node:
<identity impersonate="true" userName="USER" password="PASSWORD"/>
--
Miha Markic - RightHand .NET consulting & development
miha at rthand com
"ben" <be********@yahoo.com> wrote in message
news:ed**************@TK2MSFTNGP09.phx.gbl... Below is the error message I am receiving on a production server with the Oracle 9.2 client installed. However, on a Oracle 9.0 client installation
on the development server the problem does not occur.
System.Exception: Could not create an environment: OCIEnvCreate
returned -1. This occurs when trying to connect.
using System.Data.OracleClient this.connection = new OracleConnection("Data Source=" + ConfigurationSettings.AppSettings["db_orac"] + ";User ID=" + ConfigurationSettings.AppSettings["db_user"] + ";Password=" + ConfigurationSettings.AppSettings["db_pass"] + ";"); this.connection.Open();
this.command = new OracleCommand(); this.command.Connection = this.connection;
ds = new DataSet();
command.Parameters.Clear(); command.CommandText = "MyTableSpace.MyPackage.get_list"; command.CommandType = CommandType.StoredProcedure; command.Parameters.Add(new OracleParameter("io_cursor", OracleType.Cursor)).Direction = ParameterDirection.Output;
this.da = new OracleDataAdapter(this.command); this.da.Fill(ds,"List");
this.connection.Close();
I am desperately trying to find a solution. Any help would be much appreciated!!
Regards,
Ben
Ben,
I'm having the same problem. However, it only happens for ASP.Net.
I often will do much of my testing of routines and data access from a fat
client before moving the code to the ASP.Net side. I spent much of my time
yesterday developing the code in my test app, when I moved it to ASP.Net the
problem occurred.
"ben" <be********@yahoo.com> wrote in message
news:ed**************@TK2MSFTNGP09.phx.gbl... Below is the error message I am receiving on a production server with the Oracle 9.2 client installed. However, on a Oracle 9.0 client installation
on the development server the problem does not occur.
System.Exception: Could not create an environment: OCIEnvCreate
returned -1. This occurs when trying to connect.
using System.Data.OracleClient this.connection = new OracleConnection("Data Source=" + ConfigurationSettings.AppSettings["db_orac"] + ";User ID=" + ConfigurationSettings.AppSettings["db_user"] + ";Password=" + ConfigurationSettings.AppSettings["db_pass"] + ";"); this.connection.Open();
this.command = new OracleCommand(); this.command.Connection = this.connection;
ds = new DataSet();
command.Parameters.Clear(); command.CommandText = "MyTableSpace.MyPackage.get_list"; command.CommandType = CommandType.StoredProcedure; command.Parameters.Add(new OracleParameter("io_cursor", OracleType.Cursor)).Direction = ParameterDirection.Output;
this.da = new OracleDataAdapter(this.command); this.da.Fill(ds,"List");
this.connection.Close();
I am desperately trying to find a solution. Any help would be much appreciated!!
Regards,
Ben
Miha,
Thanks for the timely advice..
Adding the identity impersonate tag to the web.config file did the trick...
Richard
"Miha Markic" <miha at rthand com> wrote in message
news:e3**************@TK2MSFTNGP09.phx.gbl... Hi ben,
I think Elliot is right - just give aspnet process enough privileges to oracle's bin directory (and directories below). Or run aspnet app under another account: Just put a line into web.config file somewhere under <system.web> node:
<identity impersonate="true" userName="USER" password="PASSWORD"/>
-- Miha Markic - RightHand .NET consulting & development miha at rthand com
"ben" <be********@yahoo.com> wrote in message news:ed**************@TK2MSFTNGP09.phx.gbl... Below is the error message I am receiving on a production server with
the Oracle 9.2 client installed. However, on a Oracle 9.0 client
installation on the development server the problem does not occur.
System.Exception: Could not create an environment: OCIEnvCreate returned -1. This occurs when trying to connect.
using System.Data.OracleClient this.connection = new OracleConnection("Data Source=" + ConfigurationSettings.AppSettings["db_orac"] + ";User ID=" + ConfigurationSettings.AppSettings["db_user"] + ";Password=" + ConfigurationSettings.AppSettings["db_pass"] + ";"); this.connection.Open();
this.command = new OracleCommand(); this.command.Connection = this.connection;
ds = new DataSet();
command.Parameters.Clear(); command.CommandText = "MyTableSpace.MyPackage.get_list"; command.CommandType = CommandType.StoredProcedure; command.Parameters.Add(new OracleParameter("io_cursor", OracleType.Cursor)).Direction = ParameterDirection.Output;
this.da = new OracleDataAdapter(this.command); this.da.Fill(ds,"List");
this.connection.Close();
I am desperately trying to find a solution. Any help would be much appreciated!!
Regards,
Ben
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kevin Vogt |
last post by:
When initially loaded, my web application (below) takes ~120000 milliseconds
to open its connection. But repeated executions take 0 milliseconds each.
But when I wait for approx. 5 minutes and try...
|
by: JJ |
last post by:
Hi,
I don't know if this is the correct newsgroup to post this question, but
here goes.
I have installed Visual Studio .Net Professional 2003. I checked the
version and it is 7.1.3088. It...
|
by: ben |
last post by:
Below is the error message I am receiving on a production server with the
Oracle 9.2 client installed. However, on a Oracle 9.0 client installation on
the development server the problem does not...
|
by: George |
last post by:
I have an aspx page, this page instance a Dll make for me, this Dll imports
System.Data.OracleClient, I Add the Reference in the project and use the
gcautil -i but the error "Namespace or type...
|
by: Andy Fish |
last post by:
Hi,
I have an asp.net/ado.net application that I have just ported to work with
Oracle, using microsoft's own System.Data.OracleClient. I am having great
difficulty working out what configuration...
|
by: Big Charles |
last post by:
Hello,
I have an ASP.NET 1.1 web application running in a Windows Server 2003.
Connects to Oracle 10g through Oracle 10g Client. Data base in another
server.
But I can't connect web application...
|
by: mohins |
last post by:
I am getting the error while I am trying to connect to Oracle with my code in ASP.NET, this code is working in another machine, but it fails in my laptop, giving the below error.
Could not create...
|
by: sck10 |
last post by:
Hello,
I am using ASP.NET 2.0 (c#). I added the reference Oracle.DataAccess
2.102.2.20 v2.050727 to my Bin folder. However, I am not able to use: using
System.Data.OracleClient; Is there...
|
by: vbcsdotnet |
last post by:
hello I run an sql which returns a datarow itemarray field of
system.datetime. the problem is the database
only stores the date, but the returned value includes a time of
12:00:00 AM. I do not...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |