未能加载文件或程序集“Oracle.DataAccess, " 64位OS运行32位程序的问题

未能加载文件或程序集“Oracle.DataAccess, Version=1.102.4.0, Culture=neutral, PublicKeyToken=89b483f

64位OS系统运行32位WEB APP程序。记住,服务器ORACLE的客户端需要安装32位的,而不是64位的。

如果要32和64位同时跑,那么需要安装ORACLE的32/64位,同时在环境变量中指明

数据库没有问题了后

ASP.NET applications that use TX Text Control .NET Server must be compiled for 32-bit platforms . IIS must be configured to execute these 32-bit applications. Generally, all applications will be executed in 64-bit mode.

1. Enable IIS's 32-bit support

Open a command prompt and type in the following command:

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

This command enables the 32-bit mode in IIS.

2. Install the IIS 32-bit extensions

Open a command prompt and type the following command:

%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

This command installs the 32-bit web extensions for .NET Framework 2.0.

3. Activate .NET Framework 2.0 32-bit in IIS

In the IIS-Manager, select the 'ASP.NET v2.0.50727 (32bit)' in the 'Web Service Extensions' panel and check 'allow' to activate it.

4. Restart the IIS by opening a command prompt:

iisrestart 

64位OS运行32位程序的问题

Windows 2008 R2 全部是64位的,XP或WIN7(32-BIT)下开发的WEB APP无法正常运行。

ORACLE数据库的,客户端需要安装32-BIT,而不是64位,很多人认为服务器是OS是64位的,当然要安装64-BIT的ORACLE客户端

其实不然,程序时在32-BIT环境下编译通过的,所以你要安装32-BIT的ORACLE客户端程序。

如果同时跑32-BIT和64-BIT的,需要同时安装32和64-BIT,并在环境变量中标示。

至于IIS设置,那很简单,开启32-BIT兼容即可。建议32和64BIT APP的不要混合部署。

IIS设置兼容32位程序

http://hi.baidu.com/szhesh/blog/item/82fdc70249d8151d4bfb51f3.html

原文地址:https://www.cnblogs.com/kingangWang/p/2721097.html