This discussion is archived
3 Replies Latest reply: Nov 6, 2012 4:41 AM by 896548 RSS

How to connect host server databse to run web application?

955649 Newbie
Currently Being Moderated
Hi all,

Hope doing well,

sir i am using oracle 11g there i created my db which is installed in other system. and one another system i have the web application.

now i have to run the web application to use of that db which is installed in other system.

i set the connection string in web.config.

but it's not working.

could you help me.

thanks
  • 1. Re: How to connect host server databse to run web application?
    896548 Newbie
    Currently Being Moderated
    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
    for example
    string OracleConn = WebConfigurationManager.ConnectionStrings["OracleConnectionString"].ConnectionString;
    OracleConnection conn = new OracleConnection(OracleConn);
    4. have you opened port 1521 on server?

    regards
  • 2. Re: How to connect host server databse to run web application?
    955649 Newbie
    Currently Being Moderated
    Hi sir,

    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?

    thanks
  • 3. Re: How to connect host server databse to run web application?
    896548 Newbie
    Currently Being Moderated
    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>)     
        )
      ) 
    and login
    SQL>conn user/password@CT
    Rgds

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points