Solved

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

Posted on 2006-06-29
4
863 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 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

14 Experts available now in Live!

Get 1:1 Help Now