64位系统中开启32位应用,特别是OLEDB
IIS7 - Running 32-bit and 64-bit ASP.NET versions at the same time on different worker processes
IIS7 - Running 32-bit and 64-bit ASP.NET versions at the same time on different worker processes
In IIS6, this was a pain area. On a 64-bit Windows 2003 Server, you cannot run worker processes in both 32-bit mode and as well as 64 bit mode. Either only one of them was possible. This was possible by the below Metabase Key which would be applied to the W3SVC/AppPools node.
W3SVC/AppPools/enable32BitAppOnWin64 : true | false
Read more how to do this in IIS 6.0 here. But, in IIS7, you can run 32-bit and 64-bit worker processes simultaneously. Let’s see how to do it.
You have the same enable32BitAppOnWin64 property for the applicationPools in the applicationHost.config. Now, you can set this for individual application pools. Below is my sample configuration:
<applicationPools>
<add name="MyAppPool32bit" autoStart="true" enable32BitAppOnWin64="true" />
<add name="MyAppPool64bit" autoStart="true" enable32BitAppOnWin64="false" />
<applicationPoolDefaults>
<processModel identityType="NetworkService" />
</applicationPoolDefaults>
</applicationPools>
Below is how you do it from IIS7 manager:
- Right click on the Application Pool and select “Advanced Settings…” or select the same from the Actions pane after selecting the Application pool
- Change the “Enable 32-bit Applications” to True (if you want the application pool to spawn in a 32-bit mode)
- Click OK
Below is how you do from the AppCmd:
appcmd set apppool /apppool.name:MyAppPool32bit /enable32BitAppOnWin64:true
appcmd set apppool /apppool.name:MyAppPool32bit /enable32BitAppOnWin64:false
NOTE : By default, it is false.
Most of you may already know how to see if the process is really spun in a 32-bit mode in 64-bit OS. Yes, simple way is to open the Task Manager and go to Processes tab – you would see the below:
Now, you may ask how does the correct version of the DLLs picked up automatically. Open your applicationHost.config and search for aspnet_filter. You would see the below:
<isapiFilters>
<filter name="ASP.Net_2.0.50727.0" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness32" />
<filter name="ASP.Net_2.0.50727-64" path="%windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness64" />
</isapiFilters>
The preCondition="bitness32" or "bitness64" decides which ISAPI Filter to pick up for corresponding modes. Same case with any DLL used, for example ISAPI Filter, Modules, etc.
Happy Learning!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
2011-05-31 //过360云查杀的代码
2011-05-31 NC反弹提权教程
2011-05-31 三个入侵的必备小工具-lcx.exe、nc.exe、sc.exe