The provider is not compatible with the version of Oracle client

Discussion in 'Databases' started by Tambovsky Wolf, Jan 18, 2012.

  1. Good evening! I have an error related with version of oracle client. I have website that connects to the oracle server that is outside the webhosting of couse since you don't support native oracle environment. On the local computer it works fine, it connects and all queries are work. But after uploading everything to the hosting it shows me error : The provider is not compatible with the version of Oracle client.
    To make it work on hosting I had to create "Bin" directory and copied the same version of Oracle.DataAccess.dll into this folder as i'm using on my local computer. But, despite on this, it shows me error with version: http://www.fareastaz.com/about.aspx
    This is my class file that supposed to connect to the database:
    Code:
    using System;
    using System.Collections.Generic;
    using System.Web;
    using System.Web.Configuration;
    using Oracle.DataAccess.Client;
    
    
    public class clsContentConnected
    {
        private static readonly string _connectionString;
        static clsContentConnected()
        { _connectionString = WebConfigurationManager.ConnectionStrings["MyOracle"].ConnectionString; }
    
        //Displaying content from HOME PAGE
        public List<ppContent> GetContentForPage(int PageId)
        {
            List<ppContent> objPage = new List<ppContent>();
            OracleConnection conn = new OracleConnection(_connectionString);
            OracleCommand cmd = new OracleCommand("SELECT * FROM tbl_content WHERE id="+PageId.ToString(), conn);
            try
            {
                conn.Open();
                OracleDataReader dr = cmd.ExecuteReader();
                while (dr.Read())
                {
                    ppContent text = new ppContent();
                    text.ppContentText = dr["text"].ToString();
                    text.ppContentID = int.Parse(dr["id"].ToString());
                    objPage.Add(text);
                }
                return objPage;
            }
            catch (Exception ex)
            {
            objPage.Clear();
                return objPage;
            }
            finally
            {conn.Close();}
    
    
            }
    
    }
    
    web.config
    Code:
    <?xml version="1.0"?>
    <configuration>
    <connectionStrings>
        <add name="MyOracle" connectionString="DATA SOURCE=*******;PASSWORD=password;USER ID=idididid" providerName="Oracle.DataAccess.Client"/>
      </connectionStrings>
    
    <system.web>
        <trust level="Full" />
        <pages theme="red">
          <controls>
            <add tagPrefix="my" tagName="imgUnderConstruction" src="~/App_Controls/UnderConstrControl.ascx"/>
          </controls>
        </pages>
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <add assembly="Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89B483F429C47342"/>
          </assemblies>
        </compilation>
      </system.web>
    </configuration>
    Guys, as far as I know, oracle client or oracle data provider have full support in .net framework even in version 1.1 . I'm using asp.net 4.0 so it is supposed to work even without creating "Bin" folders by default or installed by hosting staff on demand.

    From the support service I have a reply on this issue thats states like :

    Another words support team thinks I have some issues in coding and it is not their job to improve and install something on the server. I didn't ask them "individual website programming" all was I asking is good working programming environment.

    Dear online community forum, did anyone face this problem with connection to the Oracle server and what are the ways to make things work?
     
    Last edited by a moderator: Oct 14, 2015
  2. Elshadriel

    Elshadriel Winhost Staff

    Try taking a look at this link:

    http://forums.asp.net/t/1599575.aspx/1/10

    The only thing that stuck out was that you might not using the correct library. Try the x86 version instead of the x64 version.
     
  3. Actually I've copied x86 version to the hosting. It doesn't work. Any other assumptions?
     
  4. Elshadriel

    Elshadriel Winhost Staff

  5. Thank you so much it helped a lot it's working now :)
     
  6. Elshadriel

    Elshadriel Winhost Staff

    I'm so glad to hear that. :D
     

Share This Page