This content has been marked as final. Show 3 replies
please answer for below questions:
1. did you install oracle clinet (for example ODAC) on client machine and did you configured tnsnames file? - most important
try connect with db on server from clinet computer with Visual Studio or sqlplus. Check yr connection with db from client to server.
2. what is yr oracle connection name in web.config
3. are you using the above connection name in yr application
4. have you opened port 1521 on server?
string OracleConn = WebConfigurationManager.ConnectionStrings["OracleConnectionString"].ConnectionString; OracleConnection conn = new OracleConnection(OracleConn);
thanks for response
i have installed oracle client in client system and i tried to access database.
now getting this error : ORA-12541: TNS:no listener
i googled this error and got it that tns in server database is not configured properly.
so how to configured it?
You should create tnsnames.ora or edit - if exists
the file should contains (for example)
CT = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = <server_ip or server_name>)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = <orcl>) ) )