Solved

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

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 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