How to check if IIS is in 32bit or 64bit mode

拟墨画扇 提交于 2019-11-30 14:33:45

问题


I'm trying to deploy a site to a 64bit OS. I'm deploying to IIS6. The site was developed on a 32bit server. The site deployed correctly however it's trying to access a COM component and that is failing.

I believe the error is occurring because the COM component is a 64bit version on the 64bit OS. And IIS6 is running in 32bit mode on the 64bit server.

I'd like to confirm this but I can't seem to find a definitive way to check if IIS6 is in 32bit mode or 64bit mode.

Would someone know the best way to check if IIS6 is in 64bit or 32bit mode?

EDIT: I'm using IIS6


回答1:


which version of IIS? to check it manually just click the application pool, in properties or advanced properties

if you need to check it programatically you can do it through WMI:

/LM/W3SVC namespace on the

IIsWebService class

Enable32BitAppOnWin64 property

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5d306956-b2a2-4708-9bb9-72a395d474bb.mspx?mfr=true




回答2:


Goto IIS manager -> Application pools -> Select the apppool you want and -> Advanced Settings.

In there there's a setting called enable 32bit apps. If that's true, that means the worker process is forced to run in 32bit. If the setting is false, then the apppool is running in 64bit mode.

Also you can open up task manager and check the w3wp.exe. If it's shown as w3wp*32.exe then its 32bit.

More info here




回答3:


In .NET code (pre-V4) you can check the size of an IntPtr instance.

In V4 check Environment.Is64BitProcess and Environment.Is64BitOperatingSystem properties.




回答4:


For IIS6 you can run this command:

C:\Inetpub\AdminScripts> cscript adsutil.vbs GET W3SVC/AppPools/Enable32BitAppOnWin64




回答5:


Go to IIS using : Run command -> type "inetmgr" see the Application pool settings, Select the Framework of your application Click on Advance Setting on the right Menu option See the "Enable 32-Bit Application" option

If "Enable 32-Bit Application" - "TRUE" then your application executes in 32 bit, If "FALSE" then it executes in 64 Bit



来源:https://stackoverflow.com/questions/2804040/how-to-check-if-iis-is-in-32bit-or-64bit-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!