|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problem with ODP.Net and TNSNames9.2.0.401. I am developing using a local copy of IIS version 5.1. When I use a connection string to connect to Oracle utilising a data source in my TNSNames.ora file initially everything is fine and I can connect without any problem. After about 2 minutes as I move from page to page and requery the database I seem to loose the connection with the error "ORA-12154: TNS:could not resolve service name". I am using the following line in my web.config file to create the connection string:- <add key="Main.ConnectionString" value="data source=dev.ora;User Id=xxxx;Password=xxxx;persist security info=false;Pooling=true;Connection Lifetime=120;Min Pool Size=0;Incr Pool Size=1;Decr Pool Size=1;Max Pool Size=20;"/> Interestingly if I change this to the relevant data source entry within my TNSNames file:- <add key="Main.ConnectionString" value="data source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xxxxxx)(PORT=xxxx)))(CONNECT_DATA =(SERVICE_NAME = dev.xxx.xxx.xx)) );User Id=xxxx;Password=xxxx;Pooling=true;Connection Lifetime=120;Min Pool Size=0;Incr Pool Size=1;Decr Pool Size=1;Max Pool Size=20;"/> Then I do not have any problems. I would prefer to use TNSNames rather than entering the datasource directly. Has anyone any ideas why I loose the connection? I have now resolved this. It was caused by "Autheticated Users" not
having permissions on the folder containing my Oracle Home. According to the Oracle site "If you install Oracle9i Release 2 (9.2.0.1.0) on a computer running Windows with an NTFS partition, the contents of ORACLE_HOME directory will not be visible to users who are authenticated on that machine. These permissions were not set properly when the software was installed. Applications that were working fine with previous versions of Oracle software will stop working when they upgrade to Oracle 9.2." |
|||||||||||||||||||||||