简体   繁体   English

使用asp.net连接到Oracle数据库11g

[英]Connect to Oracle database 11g with asp.net

I use Microsoft Visual Studio Express 2012 for Web and Oracle database 11g in Window 8. 我在Window 8中将Microsoft Visual Studio Express 2012用于Web和Oracle数据库11g。

When I use GridView to connect the database, I get following error. 当我使用GridView连接数据库时,出现以下错误。

Oracle Client and networking components were not found. 找不到Oracle客户端和网络组件。 These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3 or later client software installation. 这些组件由Oracle Corporation提供,并且是Oracle版本7.3.3或更高版本的客户端软件安装的一部分。

Provider is unable to function until these components are installed. 在安装这些组件之前,提供程序将无法运行。

How can I solve this problem? 我怎么解决这个问题?

I have found this answer from here , hope it solves your issue: 我从这里找到了这个答案,希望它能解决您的问题:

To find out the reason and solutions for this error follow the following steps 要找出此错误的原因和解决方案,请按照以下步骤操作

  1. Try a test connection in oracle's sql plus utility. 在oracle的sql plus实用程序中尝试测试连接。 If the connection fails you have a bad installation or configuration of oracle client components. 如果连接失败,则说明Oracle客户端组件的安装或配置错误。

  2. If the oracle is first installed on IIS you should reboot at once. 如果oracle首先安装在IIS上,则应立即重新启动。

  3. If theire is multiple copies of OCIW32.dll you have to make sure that there is only one copy of OCIW32.dll which should be in /Bin folder of the oracle home folder. 如果该目录是OCIW32.dll的多个副本,则必须确保只有一个OCIW32.dll副本应位于oracle主文件夹的/ Bin文件夹中。

  4. Add the IUSR_machine name account and the IWAM_machine name account to the Oracle home folder. 将IUSR_machine名称帐户和IWAM_machine名称帐户添加到Oracle主文件夹。 Give both accounts full control. 完全控制两个帐户。

To do this, right-click on the Oracle home folder in Windows Explorer. 为此,请在Windows资源管理器中右键单击Oracle主文件夹。 Click Properties, and then click the Security tab. 单击属性,然后单击安全选项卡。 Add the appropriate accounts and then give them full control. 添加适当的帐户,然后完全控制他们。 Restart your computer. 重启你的电脑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM