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


I have this problem, I need to connect an ASP.NET web app through ODP.NET 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:
      (SERVICE_NAME = prueba)

      (SID = CLRExtProc)

This is Listener.ora in server jne-prueba:

    (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")

      (ADDRESS = (PROTOCOL = TCP)(HOST = jne-prueba)(PORT = 1521))

ADR_BASE_LISTENER = D:\app\oracle


This is sqlnet.ora in jne-prueba:


These files are in:


tnsnames.ora entry in PC where ASP:NET app is:
    (ADDRESS = (PROTOCOL = TCP)(HOST = jne-prueba)(PORT = 1521))
      (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.
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.
slightwv (䄆 Netminder) Commented:
Also check the sqlnet.ora in the ODP.Net oracle home.
miyahiraAuthor Commented:
Toad and web app use the same tnsnames.ora in my PC:

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

miyahiraAuthor Commented:
In my PC where is:


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



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

Did you install sqlplus?

from a command prompt try:
sqlplus orgpol/xxx@DESAOPINT
miyahiraAuthor Commented:
In my client PC, where toad and are, I only installed ODP.NET 10.0. So I didn't install sqlplus or Oracle Client.
miyahiraAuthor Commented:
However, using Net Manager I can connect successfully.
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?
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 in other servers, I got no problem. The problem is with this oracle 11g.

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

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?

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.
miyahiraAuthor Commented:
Thank you slightwv
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.