配置 ASP.NET 在 x64 Windows 上使用 x86

发布于 2024-08-05 03:01:27 字数 405 浏览 11 评论 0原文

我正在尝试部署 GAL Modifier,这是一个在 Windows 2003 x64 上使用 Microsoft Access 的 ASP.NET 网站机器。但是,x64 上没有 JET 驱动程序(请参阅 此处),因此更改是使用将目标 CPU 更改为 x86。

然而,由于它是一个网站,除了任何 CPU 之外,Visual Studio 中没有任何选项,那么我如何更改设置以强制它使用 x86?

I am trying to deploy GAL Modifier, which is an ASP.NET website which uses Microsoft Access on a Windows 2003 x64 machine. However there is no JET driver on x64 (see here), so the change is to use change the target CPU to x86.

However as it is a web site there is no option in Visual Studio except Any CPU, so how can I change the settings to force it to use x86?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

記憶穿過時間隧道 2024-08-12 03:01:28

您可能希望在该语句末尾添加 1 或 0,而不是“true”

http://support.microsoft.com/kb/894435/en-us(这是一个旧链接,但您可以通过回程机https://web.archive.org/web/20150131051556/http://support .microsoft.com/kb/894435/EN-US/)

ASP.NET 1.1,32 位版本

要运行 32 位版本的 ASP.NET 1.1,请按照下列步骤操作:

单击“开始”,单击“运行”,键入 cmd,然后单击“确定”。

  • 键入以下命令以启用 32 位模式:
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
  • 键入以下命令以安装 ASP.NET 1.1 版本并在 IIS 根目录及以下位置安装脚本映射:
    %SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
  • 确保 ASP.NET 版本 1.1.4322 的状态在 In​​ternet 信息服务管理器的 Web 服务扩展列表中设置为“允许”。

ASP.NET 2.0,32 位版本

要运行 32 位版本的 ASP.NET 2.0,请按照下列步骤操作:

单击“开始”,单击“运行”,键入 cmd,然后单击“确定”。

  • 键入以下命令以启用 32 位模式:
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
  • 键入以下命令以安装 ASP.NET 2.0(32 位)版本并在 IIS 根目录及以下位置安装脚本映射:
    %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
  • 确保 Internet 信息中的 Web 服务扩展列表中 ASP.NET 版本 2.0.50727(32 位)的状态设置为“允许”服务经理。

ASP.NET 2.0,64 位版本

要运行 64 位版本的 ASP.NET 2.0,请按照下列步骤操作:

  • 单击“开始”,单击“运行”,键入 cmd,然后单击“确定”。
  • 键入以下命令以禁用 32 位模式:
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0
  • 键入以下命令以安装 ASP.NET 2.0 版本并在 IIS 根目录及以下位置安装脚本映射:
    %SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i
  • 确保 ASP.NET 版本 2.0.50727 的状态在 In​​ternet 信息服务管理器的 Web 服务扩展列表中设置为“允许”。

You may want to put a 1 or 0 on the end of that statement rather than "true"

http://support.microsoft.com/kb/894435/en-us (this is an old link but you can find details with the wayback machine https://web.archive.org/web/20150131051556/http://support.microsoft.com/kb/894435/EN-US/)

ASP.NET 1.1, 32-bit version

To run the 32-bit version of ASP.NET 1.1, follow these steps:

Click Start, click Run, type cmd, and then click OK.

  • Type the following command to enable the 32-bit mode:
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
  • Type the following command to install the version of ASP.NET 1.1 and to install the script maps at the IIS root and under:
    %SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i
  • Make sure that the status of ASP.NET version 1.1.4322 is set to Allowed in the Web service extension list in Internet Information Services Manager.

ASP.NET 2.0, 32-bit version

To run the 32-bit version of ASP.NET 2.0, follow these steps:

Click Start, click Run, type cmd, and then click OK.

  • Type the following command to enable the 32-bit mode:
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1
  • Type the following command to install the version of ASP.NET 2.0 (32-bit) and to install the script maps at the IIS root and under:
    %SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i
  • Make sure that the status of ASP.NET version 2.0.50727 (32-bit) is set to Allowed in the Web service extension list in Internet Information Services Manager.

ASP.NET 2.0, 64-bit version

To run the 64-bit version of ASP.NET 2.0, follow these steps:

  • Click Start, click Run, type cmd, and then click OK.
  • Type the following command to disable the 32-bit mode:
    cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0
  • Type the following command to install the version of ASP.NET 2.0 and to install the script maps at the IIS root and under:
    %SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i
  • Make sure that the status of ASP.NET version 2.0.50727 is set to Allowed in the Web service extension list in Internet Information Services Manager.
疑心病 2024-08-12 03:01:28

在iis 6.0上,在左侧选择“应用程序池”,然后(在右侧)右键单击您的应用程序并单击“高级设置...”,在“启用32位应用程序”选项上,更改为是的,您已经准备好出发了!

on iis 6.0, on your left side select "Application Pools", then (on your right side) right click on your app and click on "Advanced Settings...", on the "Enable 32-Bit Applications" option, change to True, and you're ready to go!

月寒剑心 2024-08-12 03:01:27

您应该将应用程序池设置为 32 位。转到 IIS7 管理控制台中的应用程序池,右键单击您的应用程序池并选择“设置应用程序池默认值...”项。

在属性对话框中,将“启用 32 位应用程序”设置为“True”。

这将使应用程序池进程成为 32 位(在 WOW64 模式下运行)并在进程中加载​​ 32 位版本的 .NET Framework。

在 IIS6 中,基本上同样的情况也适用。您应该切换到 32 位应用程序池 启用 32 位 ISAPI 扩展

cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 "true"

此外,您需要将应用程序映射从 Framework64 文件夹中的 aspnet_isapi.dll 更改为 aspnet_isapi .dllFramework 文件夹中。对于 aspnet_filter.dll 也应该做同样的事情。

您可以在服务器上重新注册 ASP.NET,而不用手动更改 DLL 配置:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i -enable

You should make the application pool 32 bit. Go to Application Pools in IIS7 Management Console, right click your application pool and select "Set Application Pool Defaults..." item.

In the properties dialog, set "Enable 32 Bit Applications" to "True."

This will make the application pool process 32 bit (running in WOW64 mode) and loads the 32 bit version of .NET Framework in the process.

In IIS6, basically the same thing applies. You should switch to 32 bit application pool to enable 32 bit ISAPI extensions:

cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 "true"

Also, you need to change application mappings from aspnet_isapi.dll in Framework64 folder to aspnet_isapi.dll in Framework folder. The same thing should be done with aspnet_filter.dll.

You can re-register ASP.NET on the server instead of manually changing the DLL configurations:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i -enable
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文