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

ARM架构MacBook的UTM虚拟机中无法打开WCF客户端

在Windows ARM的UTM虚拟机中调用WCF客户端时遇到COM类未注册及IIS Express启动失败问题

问题场景

  • 运行环境:基于Windows ARM镜像的UTM虚拟机,Visual Studio Community
  • 异常表现:
    • 浏览器打开服务时出现Web客户端错误
    • 下载文件时提示无法启动IIS Express
    • 核心错误:REGDB_E_CLASSNOTREG(错误码0x80040154),无法获取CLSID为{A9E69610-B80D-11D0-B9B9-00A0C922E750}的COM组件类工厂
  • 已尝试操作:删除IIS文件夹重建、启用Windows中的.NET Framework,问题未解决

解决方案

1. 注册.NET Framework相关组件

CLSID {A9E69610-B80D-11D0-B9B9-00A0C922E750}对应IIS Admin Service关联的COM组件,ARM架构下可能未自动注册。以管理员身份打开命令提示符,执行以下命令:

// 注册32位组件
regsvr32 "%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe" -i
// 注册64位组件(若系统为64位)
regsvr32 "%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe" -i

执行完成后重启IIS Express和Visual Studio。

2. 配置项目平台兼容性

  • 打开项目属性 → 生成 → 平台目标,选择x64(而非Any CPU)
  • 若项目依赖32位组件,勾选"首选32位"选项
  • 执行Build > Clean Solution清理项目后重新生成

3. 修复IIS Express的ARM适配

  • 卸载当前IIS Express,下载并安装ARM版本的IIS Express
  • 删除%USERPROFILE%\Documents\IISExpress下的所有配置文件,重启Visual Studio让其自动生成新配置

4. 手动注册缺失的COM组件

  • 打开注册表编辑器(regedit),搜索{A9E69610-B80D-11D0-B9B9-00A0C922E750},查看InprocServer32项中的dll路径
  • 以管理员身份运行命令注册该dll:
    // 若为32位dll,需使用SysWOW64下的regsvr32
    regsvr32 "dll文件的完整路径"
    

5. 检查Windows IIS功能完整性

  • 打开「控制面板 → 程序 → 打开或关闭Windows功能」
  • 确保Internet Information Services下的所有子组件(尤其是IIS管理服务、ASP.NET相关选项)均已启用
  • 重启虚拟机后再次测试

完整错误信息
Server Error in '/' Application.
Retrieving the COM class factory for component with CLSID {A9E69610-B80D-11D0-B9B9-00A0C922E750} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {A9E69610-B80D-11D0-B9B9-00A0C922E750} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Stack Trace:
[COMException (0x80040154): Retrieving the COM class factory for component with CLSID {A969610-B80D-11D0-B9B9-00A0C922E750} failed due to the following error: 80040154 Class not registered]
System.Runtime.AsyncResult.End(IAsyncResult result) +848
System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +276
System.Web.CallHandlerExecutionStep.InvokeEndHandler(IAsyncResult ar) +248
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +200

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.17 20:32:39