Solved

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

Posted on 2006-06-29
4
876 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

617 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