How to run VS 2010 Local IIS in 32 bit mode

后端 未结 3 1653
死守一世寂寞
死守一世寂寞 2021-01-15 11:52

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

3条回答
  •  情深已故
    2021-01-15 12:29

    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.

提交回复
热议问题