Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
When my website was run locally that time it works properly but whenever i hosted it in IIS getting problem.
Problems connection to Oracle 11g database from IIS7 ASP.net using system.data.common
Posted
Updated 25-Oct-13 2:54am
v2
Comments
thatraja 25-Oct-13 8:06am    
/*IIS getting problem.*/
what's that? Include complete error & log details in your question.
Tejas Vaishnav 25-Oct-13 8:55am    
Can you please share your error message

1 solution

Hello Rajesh,

MSDN Library
The System.Data.Common namespace provides generic classes for working with data that let you write code that can work across different data providers, as long as the data is isomorphic. The programming model for writing provider-independent code is based on the use of the "factory" design pattern, which uses a single API to access databases across multiple providers.
Given this info and more available here[^], I suspect that the ODP is not correctly installed or not installed at all on the machine where you are hosting the site.

So go ahead and download the ODP.NET xcopy installer from OTN website[^]. Do remember to download the correct version. Follow the installation instructions to install the provider. There after it's just a configuration, which I am sure is done properly as it's working locally?

Sample Configuration
XML
<system.data>
  <dbproviderfactories>
    <!-- Remove in case this is already defined in machine.config -->
    <remove invariant="Oracle.DataAccess.Client" />
    <add name="Oracle Data Provider for .NET">
         invariant="Oracle.DataAccess.Client"
         description="Oracle Data Provider for .NET"
         type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
  </add></dbproviderfactories>
</system.data>

Regards,
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900