如何在32位模式下运行VS 2010本地IIS [英] How to run VS 2010 Local IIS in 32 bit mode

查看:662
本文介绍了如何在32位模式下运行VS 2010本地IIS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经提到了一些32位和64的一些位DLL在我的ASP.NET MVC 3项目。

该项目编译,但我得到的运行时错误。

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

如何在我的本地IIS启用32位(我只是如何能做到这一点在IIS 7.5专业版)?

我使用.NET 4.0

我得到的错误是:


  80040154没有注册类:

检索COM类工厂CLSID为{A6775dfd2-1dfF-421C-A187-4D55F4DDFBFF}组件失败,原因是出现以下错误(从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:真正的

,或者设置特定的应用程序池(更推荐恕我直言),你可以尝试以下。很抱歉,这来自于网页不再看似积极,只有谷歌的缓存是显示现在:


  

强制IIS创建一个32位的应用程序池工作进程


  
  

如果您的应用程序作为一个web应用程序,这意味着它在运行
  一个IIS应用程序池的工作进程,你会希望那个工作进程
  (w3wp.exe的)是一个32位进程。可以在被指定
  应用程序池的高级设置:


  
  

选择您的Web应用程序的应用程序池。点击高级设置下...
  编辑应用程序池的权利。更改值启用32位
  (一般)应用为True。


  
  

请注意,这个词在设置启用并不意味着允许作为
  让32位或64位应用程序。这其实就是力量
  如在迫使工人过程为在32位模式下运行,使得32位
  应用程序的支持。这意味着,应用程序池工作
  过程总是会推出为32位进程时,该设置
  有值为True。其设置为false将推出一款64位的应用程序
  池工作进程。


  
  

请注意,当一个应用程序池工作进程启动时,它显示出来
  在任务管理器进程选项卡作为映像名称列
  w3wp.exe的。当启用32位应用程序设置具有的价值
  诚然,这将被列为w3wp.exe的* 32。


I have referenced some 32 bit and some 64 bit DLL in my ASP.NET MVC 3 project.

The projects compile but I get runtime errors.

It's because I am running the web project as 64 bit.

How do I "enable 32 bit" in my local IIS (just how I can do it in IIS 7.5 Pro)?

I am using .NET 4.0

The error I get is:

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)).

解决方案

If you don't require the 64 bit component (not sure what is running there or if this can be excluded as you simply wanted to know how to run in 32 bit more)

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

You can set it at the server level via: %windir%\system32\inetsrv\appcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true

Or set your particular app pool (more recommended imho) you can try the following. Sorry the page this came from is no longer seemingly active and only googles caches is showing it now:

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.

这篇关于如何在32位模式下运行VS 2010本地IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆