Solved

ASP.NET only : ORA-12154: TNS:could not resolve service name

Posted on 2006-06-29
4
864 Views
Last Modified: 2007-12-19
Hi

I have been working on this bugs for the last 2 days and i am out of gas.

i have a ORA-12154: TNS:could not resolve service name error message when i try to acces an Oracle database

The same piece of code work in VB.NET

Here's more information

1) I do connect with SQL+ or Toad
2) I have 2 oracle client. 9i and 10g. 10g is the Oracle Default.
3) With 10G, no more need of tnsnames.ora, (i'll post my sqlnet.ora later)
4) IWAM,IUSR,ASP.NET all have full control on the OraDEV10g folder
5) IWAM,IUSR,ASP.NET all have full control on bin folder & sqlnet.ora file
6) TNS_ADMIN is set in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ and point to C:\OraDEV10g\network\admin
7) ORACLE_HOME is set in the environnement variable (value is C:\OraDEV10g)
8) I have AllFusion Harvest as source control
9) i have  <authorization><deny users="?"/></authorization> in my web.config

i am a desesperate man rigth now. believe it.

here is my SQLNET.ORA  Configuration file

NAMES.DEFAULT_DOMAIN = world
NAMES.DIRECTORY_PATH = (ONAMES,tnsnames)
NAMES.PREFERRED_SERVERS =
  (ADDRESS_LIST =  
        (ADDRESS = (PROTOCOL = TCP)(HOST = oranamesrvr1)(PORT = 1575))
        (ADDRESS = (PROTOCOL = TCP)(HOST = oranamesrvr0)(PORT = 1575))
        (ADDRESS = (PROTOCOL = TCP)(HOST = oranamesrvr2)(PORT = 1575))
  )

LOG_DIRECTORY_CLIENT   = C:\orant\Network\Log
TRACE_DIRECTORY_CLIENT = C:\orant\Network\trace
TRACE_UNIQUE_CLIENT = on
TRACE_LEVEL_CLIENT  = off

0
Comment
Question by:polycorjsp
  • 3
4 Comments
 
LVL 10

Accepted Solution

by:
orbulat earned 500 total points
ID: 17015336
I had this error before.

http://forums.devx.com/showthread.php?t=137317

Oracle 9.2 Client software requires that you give the Authenticated User
privilege to the Oracle Home by following these steps:

1. Log on to Windows as a user with Administrator privileges.

2. Launch Windows Explorer from the Start Menu and and navigate to the
ORACLE_HOME folder. This is typically the "Ora92" folder under the
"Oracle" folder (i.e. D:\Oracle\Ora92).

3. Right-click on the ORACLE_HOME folder and choose the "Properties" option
from the drop down list. A "Properties" window should appear.

4. Click on the "Security" tab of the "Properties" window.

5. Click on "Authenticated Users" item in the "Name" list (on Windows XP
the "Name" list is called "Group or user names").

6. Uncheck the "Read and Execute" box in the "Permissions" list under the
"Allow" column (on Windows XP the "Permissions" list is called
"Permissions for Authenticated Users").

7. Re-check the "Read and Execute" box under the "Allow" column (this is
the box you just unchecked).

8. Click the "Advanced" button and in the "Permission Entries" list make
sure you see the "Authenticated Users" listed there with:

Permission = Read & Execute
Apply To = This folder, subfolders and files

If this is NOT the case, edit that line and make sure the "Apply onto"
drop-down box is set to "This folder, subfolders and files". This
should already be set properly but it is important that you verify this.

9. Click the "Ok" button until you close out all of the security properties
windows. The cursor may present the hour glass for a few seconds as it
applies the permissions you just changed to all subfolders and files.

10. Reboot your computer to assure that these changes have taken effect.


Re-execute the application and it should now work.
0
 

Author Comment

by:polycorjsp
ID: 17037369
Hi

After doing all of this, it just doent work.

I did this on C:\Oracle\Ora92 and C:\OraDEV10g

here's some more info

I have XP Pro in French ("/$%?&*()

Any more idea ? event the stupid one, they migth me think about something else
0
 
LVL 10

Expert Comment

by:orbulat
ID: 17095927
how about set the oracle home?
0
 
LVL 10

Expert Comment

by:orbulat
ID: 17095938
or reinstall oracle client?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now