473,396 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Oracle - works with Framework 1.1, not with 2.0

Hi, sorry, cross-post with the ADONET newsgroup.

I have a web site on a 2003 server. The web site runs under Framework
1.1 and works with oracle, no problem.
On the same server I have another web site that runs under Framework 2.0 and
connects to the same Oracle database, same connection string. In this case I
get the following error:
ORA-12154: TNS:could not resolve service name

Thanks
Apr 11 '06 #1
3 1856

"Chris Botha" <ch*************@hotmail.com> wrote in message
news:eQ*************@TK2MSFTNGP04.phx.gbl...
Hi, sorry, cross-post with the ADONET newsgroup.

I have a web site on a 2003 server. The web site runs under Framework
1.1 and works with oracle, no problem.
On the same server I have another web site that runs under Framework 2.0
and
connects to the same Oracle database, same connection string. In this case
I
get the following error:
ORA-12154: TNS:could not resolve service name

Thanks

I'm using the .Net 2.0 Framework and Oracle 10g. This works for me :

C# code:
----------

using Oracle.DataAccess.Client;
OracleConnection foodConnQ = new OracleConnection("Persist Security
Info=True;User ID=monte;Password=zsdccc;Data Source=epicur;");
OracleDataAdapter ingr1DAq = new OracleDataAdapter("SELECT * FROM v2 where
NDB_No = :NDB_No", foodConnQ);
ingr1DAq.SelectCommand = new OracleCommand("SELECT * FROM v2 where NDB_No =
:NDB_No", foodConnQ);

my local tnsnames file:
----------------------

# tnsnames.ora Network Configuration File:
C:\oracle\product\10.1.0\Client_1\network\admin\tn snames.ora
# Generated by Oracle configuration tools.
EPICUR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = monteamd)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = epicur)
)
)

-Fred
Apr 11 '06 #2
Hi Fred, thanks for the info. My tnsnames.ora is good - Framework 1.1 works
with it happily.
I was thinking along the lines of a security problem, that Framework 2.0
cannot access the Oracle directory maybe? Did you have to change directory
security on the machine? I gave the ASPNET user full control on the Oracle
directory and sub-directories, but maybe Framework 2.0 uses another account?
I installed the Framework 2.0 from the Distributable download, so it may be
a bit different than the VS2005 install.

Thanks.
"Fred Exley" <fe*******@msn.com> wrote in message
news:12*************@corp.supernews.com...

"Chris Botha" <ch*************@hotmail.com> wrote in message
news:eQ*************@TK2MSFTNGP04.phx.gbl...
Hi, sorry, cross-post with the ADONET newsgroup.

I have a web site on a 2003 server. The web site runs under Framework
1.1 and works with oracle, no problem.
On the same server I have another web site that runs under Framework 2.0
and
connects to the same Oracle database, same connection string. In this
case I
get the following error:
ORA-12154: TNS:could not resolve service name

Thanks

I'm using the .Net 2.0 Framework and Oracle 10g. This works for me :

C# code:
----------

using Oracle.DataAccess.Client;
OracleConnection foodConnQ = new OracleConnection("Persist Security
Info=True;User ID=monte;Password=zsdccc;Data Source=epicur;");
OracleDataAdapter ingr1DAq = new OracleDataAdapter("SELECT * FROM v2 where
NDB_No = :NDB_No", foodConnQ);
ingr1DAq.SelectCommand = new OracleCommand("SELECT * FROM v2 where NDB_No
= :NDB_No", foodConnQ);

my local tnsnames file:
----------------------

# tnsnames.ora Network Configuration File:
C:\oracle\product\10.1.0\Client_1\network\admin\tn snames.ora
# Generated by Oracle configuration tools.
EPICUR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = monteamd)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = epicur)
)
)

-Fred

Apr 11 '06 #3

"Chris Botha" <ch*************@hotmail.com> wrote in message
news:Or*************@TK2MSFTNGP02.phx.gbl...
Hi Fred, thanks for the info. My tnsnames.ora is good - Framework 1.1
works with it happily.
I was thinking along the lines of a security problem, that Framework 2.0
cannot access the Oracle directory maybe? Did you have to change directory
security on the machine? I gave the ASPNET user full control on the Oracle
directory and sub-directories, but maybe Framework 2.0 uses another
account?
I installed the Framework 2.0 from the Distributable download, so it may
be a bit different than the VS2005 install.

Thanks.

I started with 2.0, so don't know what's changed. I do remember having to
screw around with tnsnames.ora to get it working, even though it worked ok
with other apps. I suspect it's some finepoint in your service names syntax
in tnsnames.ora.
Apr 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Terence | last post by:
These comparrison articles are always fun :) http://otn.oracle.com/pub/articles/hull_asp.html
1
by: Bill | last post by:
I have a problem and I need to know if anyone can assist in solving it. Our database of choice is Oracle. When we attempted to do some VB.NET coding with .NET 2002 and framework 1.0, whe had...
6
by: ´ď´ď | last post by:
How to connect asp.net with Oracle Database? Where and How to? Thanks very much.
13
by: Chris Botha | last post by:
The machine is running XP Pro with all the latest service packs, etc. I must access an Oracle database so I installed the Oracle client stuff. I can query Oracle from a Windows app, no problem....
5
by: petro | last post by:
Hello all, My asp.net web application works on my machine but I get the following error on our test web server, There is only one oracle home on the test server. Does anyone know how to resolve...
5
by: Bill | last post by:
I have a problem and I need to know if anyone can assist in solving it. Our database of choice is Oracle. When we attempted to do some VB.NET coding with .NET 2002 and framework 1.0, whe had...
7
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
9
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
0
by: Mark D Powell | last post by:
I have a 64 bit SQL Server 2005 SP2 on a Windows 2003 x64. The developer said that he needed to use OLE to talk to Oracle so I went to Oracle and downloaded the 64 bit OraOLDDB driver as...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
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...
0
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...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.