添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have a web site that I developed on Vista using Vb.net9. It makes a connection to Oracle. for the connection I use System.Data.OracleClient. It works fine on my machine, and our test server, but it does not work on the production server. We installed the Oracle Client 11 on the server. The error is System.Data.OracleClient requires Oracle client software version 8.1.7

We've tried, making a console app that opens the connection, connection runs fine, opens, displays a message and all is well there.

Then we make a simple web form, put it in the directory of the program, just a button, opens the connection, try..catch, grabs error, same error.

The console app was running under an Administrator, web site running under iwam. Is it possible that iwam has a different path?

Cause

Security permissions were not properly set when the Oracle client was installed on Windows with NTFS. The result of this is that content of the ORACLE_HOME directory is not visible to Authenticated Users on the machine; this causes an error while the System.Data.OracleClient is communicating with the Oracle Connectivity software from ASP.NET using Authenticated User privileges.

Solution

To fix the problem you have to give the Authenticated Users group privilege to the Oracle Home directory.

  • Log on to Windows as a user with Administrator privileges.
  • Start Windows Explorer and navigate to the ORACLE_HOME folder.
  • Choose properties on the ORACLE_HOME folder.
  • Click the Security tab of the Properties window.
  • Click on Authenticated Users item in the Name list.
  • Un-check the Read and Execute box in the Permissions list under the Allow column.
  • Re-check the Read and Execute box under the Allow column.
  • Click the Advanced button and in the Permission Entries verify that Authenticated Users are listed with permission: Read & Execute , and Apply To: This folder, subfolders and files . If not, edit that line and make sure that Apply To drop-down box is set to This folder, subfolders and files . This should already be set properly but it is important that you verify it.
  • Click the OK button until you close out all of the security properties windows. The cursor may present the hour glass for a few seconds as it applies the permissions you just changed to all subfolders and files.
  • Reboot, to assure that the changes have taken effect.
  • Try your application again.

    We had a variation of this--the user that the SS Reporting Services was running as was not part of "Authenticated Users", so we just had to ensure that particular user had access to the proper folders. But all in all, this was good, helpful info! Ogre Psalm33 May 21, 2009 at 20:02 thanks! i had this problem while deploying to production servers and searched around and found your answer. S.O. works! Lucas Sep 30, 2009 at 23:57 Where will i find the ORACLE_HOME folder? When Oracle Database Client 12c Release 1 installs, it creates no folder called ORACLE_HOME in the selected install path. Nor is there an environment variable named ORACLE_HOME . Ian Boyd Nov 17, 2015 at 18:42 There is a much simpler solution. Open a command line window and enter icacls /reset /T /C {Oracle installation folder} - it does the same as all these clicks. Wernfried Domscheit Apr 21, 2019 at 15:09

    Update 1: It is possible for different users to have different path. But its not the likely problem here. There is more chance that the user that the iwam user doesn't have permission to the oracle client directory.

    Update 0: Its suppose to work. Check for environment variable ( That are needed to find the oracle client and tnsnames.ora ). Also, Maybe you have a 32/64 bit issues. Also, consider using the Oracle Data Provider for .NET ( search for odp.net)

    When we first moved over to Vista with Oracle 10g, we experienced this issue when we installed the Oracle client on our Vista boxes, even when we were running with admin privileges during install.

    Oracle brought out a new version of the 10g client (10.2.0.3) that was Vista compatible.

    I do believe that this was after 11g was released, so it is possible that there is a 'Vista compatible' version for 11g also.

    Why not use this: dotConnect for Oracle (formerly known as OraDirect .NET)?

    It can be configured to not require an Oracle Client at all.

    We have been using this in both Windows Services and ASP.NET Web Services and it works like a charm.

    For me, the issue was some plugin in my Visual Studio started forcing my application into x64 64bit mode, so the Oracle driver wasn't being found as I had Oracle 32bit installed.

    So if you are having this issue, try running Visual Studio in safemode (devenv /safemode). I could find that it was looking in SYSWOW64 for the ic.dll file by using the ProcMon app by SysInternals/Microsoft.

    Update: For me it was the Telerik JustTrace product that was causing the issue, it was probably hooking in and affecting the runtime version somehow to do tracing.

    Update2: It's not just JustTrace causing an issue, JustMock is causing the same processor mode issue. JustMock is easier to fix though: Click JustMock-> Disable Profiler and then my web app's oracle driver runs in the correct CPU mode. This might be fixed by Telerik in the future.