Need to connect web app through ODP.NET 10.1.0.400 to Oracle 11g

Hello,

I have this problem, I need to connect an ASP.NET web app through ODP.NET 10.1.0.400 to an Oracle 11g, but I can't.
I can however connect via TOAD to Oracle 11g.

Server: Windows Server 2003 32 bits
Name of server: jne-prueba
Name of Instance: Prueba

This is tnsnames.ora in server jne-prueba:
--------------------------------------
PRUEBA =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = jne-prueba.DOMINTERN0JNE.LOCAL)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = prueba)
    )
  )

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )
---------------------------------------

This is Listener.ora in server jne-prueba:

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\app\oracle\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\app\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = jne-prueba)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = D:\app\oracle

----------------------------

This is sqlnet.ora in jne-prueba:
SQLNET.AUTHENTICATION_SERVICES = (NONE)

-------------------------------

These files are in:
D:\app\oracle\product\11.2.0\dbhome_1\NETWORK\ADMIN

-------------------------------

tnsnames.ora entry in PC where ASP:NET app is:
DESAOPINT =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = jne-prueba)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = dedicated)
      (SERVICE_NAME = prueba)
    )
  )

ConnectionString in ASP.NET:
<add key="ConnectionString" value="user id=orgpol;data source=desaopint;password=xxx;"/>

I got error:

ORA-1017: invalid username/password; logon denied

I think the problem is with ".DOMINTERN0JNE.LOCAL". How can I connect without problem?
As I said, with Toad I can connect without problem.
LVL 1
miyahiraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
I don't think the ".DOMINTERN0JNE.LOCAL" would cause an ORA-1017 unless it causes you to look at a different server.

Make the ODP.Net oracle_home tnsnames.ora file look like the one toad uses.
0
slightwv (䄆 Netminder) Commented:
Also check the sqlnet.ora in the ODP.Net oracle home.
0
miyahiraAuthor Commented:
Toad and asp.net web app use the same tnsnames.ora in my PC:

D:\oracle\product\10.2.0\client_1\network\ADMIN\tnsnames.ora
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

miyahiraAuthor Commented:
In my PC where asp.net is:

D:\oracle\product\10.2.0\client_1\network\ADMIN\sqlnet.ora:

# sqlnet.ora Network Configuration File: D:\oracle\product\10.2.0.\client_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)


0
slightwv (䄆 Netminder) Commented:
Just to confirm:  You can connect using Toad using:
user: orgpol
password: xxx
server: DESAOPINT


Did you install sqlplus?

from a command prompt try:
sqlplus orgpol/xxx@DESAOPINT
0
miyahiraAuthor Commented:
In my client PC, where toad and asp.net are, I only installed ODP.NET 10.0. So I didn't install sqlplus or Oracle Client.
0
miyahiraAuthor Commented:
However, using Net Manager I can connect successfully.
0
slightwv (䄆 Netminder) Commented:
In: D:\oracle\product\10.2.0\client_1\network\ADMIN

rename the tnsnames.ora and sqlnet.ora files to some backup name and copy the ones from the database server.

>>ConnectionString in ASP.NET:

This is an example from a web.config.  Are you 100% sure the .Net code is not hard coding a different username and password on some connections?
0
miyahiraAuthor Commented:
I copied  tnsnames.ora and sqlnet.ora files from server to my PC. Same result:
ORA-1017: invalid username/password; logon denied

I'm 100% sure that there is no hardcoding.

If I connect to  Oracle database 10.2.0.4.0 in other servers, I got no problem. The problem is with this oracle 11g.

0
slightwv (䄆 Netminder) Commented:
>>The problem is with this oracle 11g.

Ah...  I missed this in the thread:  in 11g passwords are case sensitive by default.  

If you know the proper case for the password change the web.config to (notice I changed the initial double quotes to singles):

<add key="ConnectionString" value='user id=orgpol;data source=desaopint;password="xXxXx";'/>

or disable case sensitive passwords (not recommended) by setting sec_case_sensitive_logon to FALSE
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
miyahiraAuthor Commented:
That was it!

I changed the password for upper letters:

alter user orgpol identified by XXX;

<add key="ConnectionString" value="data source=PRUEBA;user id=ORGPOL;password=XXX"/>

And then it connected.

However, if password is in lower letters, why can't connect?

0
slightwv (䄆 Netminder) Commented:
>>However, if password is in lower letters, why can't connect?

I said that:  in 11g passwords are now case sensitive by default.

In older version Oracle automatically took whatever you provided for a username and password and converted it to uppercase behind the scenes.
0
miyahiraAuthor Commented:
Thank you slightwv
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.