Im using a .net OracleClient in my machine for connecting to a Database in Oracle. When im trying to connect its showing this TNS Error.
Now, I have edited the tnsnames.ora file and sqlnet.ora file. When I access the Oracle using a ServerExplorer. It gets connected to the Oracle Database and its fetching everything.
I do have a ODAC component from oracle website itself which also, i tried but dint worked.
My connection string is<add name="netOracleClient" connectionString="Data Source=ff.WORLD;Persist Security Info=True;User ID=vlc;Password=vlc;Unicode=True"
providerName="System.Data.OracleClient" />
<add name="ConnectionString" connectionString="DATA SOURCE=ff.WORLD;PASSWORD=vlc;USER ID=vlc"
providerName="Oracle.DataAccess.Client" />
I tried with ServerExplorer in both the components. Its working FINE with Server explorer and im getting the datas too. But when i write the code its throwing me this error ORA-12154: TNS:could not resolve the connect identifier specified
This is the code from which Im trying to connect.
OracleConnection con = new OracleConnection(WebConfigurationManager.ConnectionStrings["netOracleClient"].ConnectionString);
Tell me a way to resolve this???
NOTE: We have machines here itself from which we are accesing the same database with the same TNS using OracleClient for .net. I also wants to use the same..
Please Help me in this.