gpt4 book ai didi

asp.net - 如何在32位模式下运行VS 2010本地IIS

转载 作者:行者123 更新时间:2023-12-02 08:06:48 27 4
gpt4 key购买 nike

我在 ASP.NET MVC 3 项目中引用了一些 32 位和一些 64 位 DLL。

项目已编译,但出现运行时错误。

这是因为我正在以 64 位运行 Web 项目。

如何在本地 IIS 中“启用 32 位”(就像在 IIS 7.5 Pro 中如何做到这一点)?

我正在使用.NET 4.0

我得到的错误是:

Retrieving the COM class factory for component with CLSID {A6775dfd2-1dfF-421C-A187-4D55F4DDFBFF} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

最佳答案

如果您不需要 64 位组件(不确定那里正在运行什么,或者是否可以排除它,因为您只是想知道如何在 32 位以上运行)

http://learn.iis.net/page.aspx/201/32-bit-mode-worker-processes/

您可以通过以下方式在服务器级别设置它:%windir%\system32\inetsrv\appcmd 设置配置 -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true

或者设置您的特定应用程序池(恕我直言,更推荐)您可以尝试以下操作。抱歉,该页面似乎不再处于事件状态,现在只有 Google 缓存显示它:

Force IIS to create a 32-bit app pool worker process

If your application is running as a web app, meaning it is running in an IIS app pool worker process, you’ll want that worker process (w3wp.exe) to be a 32-bit process. That can be specified in the advanced settings of the app pool:

Select the app pool for your web app. Click Advanced Settings… under Edit Application Pool on the right. Change the value of Enable 32-Bit Applications under (General) to True.

Note that the word “Enable” in the setting doesn’t mean “allow” as in “allow either 32- or 64-bit applications.” It actually means “force” as in “force the worker process to run in 32-bit mode so that 32-bit applications are supported.” This means that the app pool worker process will always be launched as a 32-bit process when this setting has a value of True. Setting it to False will launch a 64-bit app pool worker process.

Note that when an app pool worker process is started, it shows up in the Image Name column on the Processes tab in Task Manager as w3wp.exe. When the Enable 32-Bit Applications setting has a value of True, it will be listed as w3wp.exe *32.

关于asp.net - 如何在32位模式下运行VS 2010本地IIS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10711498/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com