You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ARM64 Mac(Parallels Win11)下.NET4.8项目IIS Express无法启动求助

IIS Express在ARM64 Win11(Parallels M2 Mac)启动失败:Error loading global modules 解决办法

问题场景

  • 环境:M2 Mac通过Parallels运行ARM64版本Windows 11,使用Visual Studio 2022社区版
  • 现象:.NET 4.8 WebForms项目可在本地IIS正常运行,但IIS Express启动失败,提示Error loading global modules
  • 运行追踪命令后的日志:
Starting IIS Express ...
Initializing the W3 Server Started CTC = 1389375
W3 Server initializing WinSock.  CTC = 1389390
W3 Server WinSock initialized.  CTC = 1389390
W3 Server ThreadPool initialized (ipm has signalled).  CTC = 1389390
Failed processing with hr = 8007007e
Error loading global modules.  hr = 8007007e
Terminating W3_SERVER object
Start listenerChannel http:0
Initializing the W3 Server Started CTC = 1390546
W3 Server initializing WinSock.  CTC = 1390546
W3 Server WinSock initialized.  CTC = 1390546
W3 Server ThreadPool initialized (ipm has signalled).  CTC = 1390546
Failed processing with hr = 8007007e
Error loading global modules.  hr = 8007007e
Terminating W3_SERVER object
InitComplete event signalled
Process Model Shutdown called
Waiting for all LISTENER_CHANNELS to stop
Unable to start iisexpress.

Das angegebene Modul wurde nicht gefunden.
For more information about the error, run iisexpress.exe with the tracing switch enabled (/trace:error)

解决办法

  • 检查并清理全局模块配置
    打开C:\Program Files\IIS Express\config\applicationhost.config,找到<globalModules>节点,逐一核对每个模块的image路径:

    • 若存在指向C:\Program Files (x86)\路径的模块,直接注释掉这些条目(ARM64环境无法加载x86架构的模块)
    • 保存配置文件后重新启动IIS Express
  • 重置IIS Express用户配置

    1. 关闭Visual Studio及所有IIS Express进程
    2. 删除%USERPROFILE%\Documents\IISExpress目录下的全部文件
    3. 重新打开Visual Studio并启动项目,系统会自动生成全新的默认配置
  • 修复Visual Studio安装

    1. 打开Visual Studio Installer,选择"修改"
    2. 确认ASP.NET和Web开发工作负载下的IIS Express组件已勾选,且为ARM64版本
    3. 点击"修改"完成修复,重启Visual Studio后重试
  • 指定ARM64版本IIS Express启动
    右键项目 → 属性 → Web → 服务器选项卡:

    • 确认选择的IIS Express路径为C:\Program Files\IIS Express\iisexpress.exe(避免误选Program Files (x86)下的x86版本)
    • 若之前配置过虚拟目录,可点击"创建虚拟目录"刷新配置后启动

内容的提问来源于stack exchange,提问作者slb

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 12:43:24