当我的网站在本地运行时,它可以正常工作,但每当我在IIS中托管它时出现问题。 使用system.datamon从IIS7 ASP连接到Oracle 11g数据库的问题
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 using system.datamon
推荐答案Hello Rajesh, Hello Rajesh, MSDN Library MSDN Library
System.Data.Common命名空间提供了用于处理数据的通用类,只要数据是同构的,您就可以编写可以跨不同数据提供程序工作的代码。编写与提供程序无关的代码的编程模型基于工厂设计模式的使用,该模式使用单个API来访问跨多个提供程序的数据库。
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.
给定此信息并提供更多信息这里 [ ^ ],我怀疑在您托管网站的计算机上没有正确安装或未安装ODP。 继续从OTN网站 [ ^ ]。请记得下载正确的版本。按照安装说明安装提供程序。在它之后只是一个配置,我确信它在本地工作正常吗? 样本配置
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
<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,
更多推荐
在IIS中托管时与oracle连接时出现问题?
发布评论