locked
Oracle connection in web.config RRS feed

  • Question

  • User-59962394 posted

    Hi

    I am connecting to SQL server and Oracle with the below connection strings in web.config. My project needs windows authentication.

    <connectionStrings>
        <add name="dbSQLConnectionString" connectionString="Data Source=SQLDB;Initial Catalog=sql; User ID=username;Password=pswd" providerName="System.Data.SqlClient"/> 
        <add name="dbOracleConnString" connectionString="Data Source=ORADB;Password=pswd;User ID=username;Persist Security Info=True" providerName="System.Data.OracleClient"/>
      </connectionStrings> 

    It works in my local machine but when deployed into the server, SQL part works fine wihtout any problem but the pages using oracle doesn't open anything and shows empty page.

    Please let me know whats the problem in my connection string with Oracle which is not allowing to connect to server.

    Thanks in advance.

    Tuesday, November 23, 2010 5:16 AM

Answers

  • User-193293338 posted

    maybe it's not your connection string but rather the authentication of the user.  From your local machine it might be using what you logged into Windows with and not what's in your web pages.  Try and login to the db from the Oracle client on the server using the username pswd. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 23, 2010 9:06 AM

All replies

  • User-193293338 posted

    maybe it's not your connection string but rather the authentication of the user.  From your local machine it might be using what you logged into Windows with and not what's in your web pages.  Try and login to the db from the Oracle client on the server using the username pswd. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, November 23, 2010 9:06 AM
  • User-1495222096 posted

    Hi Swapna,

    The connection string for oracle is fine except one thing i noticed try setting the Persist Security Info=False instead of true

    Check the following

    1. check that on your remote server you have made necessary changes to the oracle tnsnames file.

    2. check that whether you are able to connect to remote oracle server through PL/SQL client or any oracle client

    let me know if you are still facing the issue.

     

    Regards,

    Anthony

    Tuesday, November 23, 2010 9:17 AM
  • User-59962394 posted

    There is not problem in the connection string. Its the problem with the DB i am using. When i changed the DB it works fine without any problem.

     

    Thanks you. 

    Wednesday, November 24, 2010 7:06 AM