安装问题疑难解答Troubleshooting Setup Issues

本主题介绍如何对 Windows Communication Foundation (WCF) 设置问题进行故障排除。This topic describes how to troubleshoot Windows Communication Foundation (WCF) set up issues.

有些 Windows Communication Foundation 注册表项无法通过在 .NET Framework 3.0 上执行 MSI 修复操作来修复Some Windows Communication Foundation Registry Keys are not Repaired by Performing an MSI Repair Operation on the .NET Framework 3.0

如果您删除下面的任何注册表项:If you delete any of the following registry keys:

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceModelService 3.0.0.0HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceModelService 3.0.0.0

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceModelOperation 3.0.0.0HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceModelOperation 3.0.0.0

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceModelEndpoint 3.0.0.0HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ServiceModelEndpoint 3.0.0.0

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMSvcHost 3.0.0.0HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SMSvcHost 3.0.0.0

  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSDTC Bridge 3.0.0.0HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSDTC Bridge 3.0.0.0

不使用.NET Framework 3.0 安装程序从启动运行修复时重新创建密钥添加/删除程序中的小程序控制面板The keys are not re-created if you run repair by using the .NET Framework 3.0 installer launched from the Add/Remove Programs applet in Control Panel. 若要重新正确创建这些项,用户必须卸载并重新安装 .NET Framework 3.0。To recreate these keys correctly, the user must uninstall and reinstall the .NET Framework 3.0.

在安装 .NET Framework 3.0 软件包过程中 WMI Service Corruption 阻止 Windows Communication Foundation WMI 提供程序的安装WMI Service Corruption Blocks Installation of the Windows Communication Foundation WMI provider during installation of .NET Framework 3.0 package

WMI Service Corruption 可能阻止 Windows Communication Foundation WMI 提供程序的安装。WMI Service Corruption may block the installation of the Windows Communication Foundation WMI provider. 在安装过程中,Windows Communication Foundation 安装程序无法使用 mofcomp.exe 组件注册 WCF .mof 文件。During installation the Windows Communication Foundation installer is unable to register the WCF .mof file using the mofcomp.exe component. 下面列出了几个症状:The following is a list of symptoms:

  1. .NET Framework 3.0 安装成功完成,但未注册 WCF WMI 提供程序。.NET Framework 3.0 installation completes successfully, but the WCF WMI provider is not registered.

  2. 应用程序事件日志中显示一个错误事件,该事件指示在注册 WCF 的 WMI 提供程序或运行 mofcomp.exe 时出现问题。An error event appears in the application event log that references problems registering the WMI provider for WCF, or running mofcomp.exe.

  3. 用户的 %temp% 目录中名为 dd_wcf_retCA* 的安装日志文件包含对注册 WCF WMI 提供程序失败的引用。The setup log file named dd_wcf_retCA* in the user's %temp% directory contains references to failure to register the WCF WMI provider.

  4. 事件日志或安装跟踪日志文件中可能会列出以下异常之一:An exception such as one the following may be listed in the event log or setup trace log file:

    ServiceModelReg [11:09:59:046]:System.ApplicationException:意外的结果 3 执行 E:\WINDOWS\system32\wbem\mofcomp.exe 使用"E:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModel.mof"ServiceModelReg [11:09:59:046]: System.ApplicationException: Unexpected result 3 executing E:\WINDOWS\system32\wbem\mofcomp.exe with "E:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModel.mof"

    或:or:

    ServiceModelReg [07:19:33:843]:System.TypeInitializationException:System.Management.ManagementPath 的类型初始值设定项引发了异常。ServiceModelReg [07:19:33:843]: System.TypeInitializationException: The type initializer for 'System.Management.ManagementPath' threw an exception. ---> System.Runtime.InteropServices.COMException (0x80040154):检索具有 CLSID {CF4CC405-E2C5-4DDD-B3CE-5E7582D8C9FA} 因以下错误失败的组件的 COM 类工厂:80040154.---> System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {CF4CC405-E2C5-4DDD-B3CE-5E7582D8C9FA} failed due to the following error: 80040154.

    或:or:

    ServiceModelReg [07:19:32:750]:System.IO.FileNotFoundException:无法加载文件或程序集 C:\WINDOWS\system32\wbem\mofcomp.exe 或其某个依赖项。ServiceModelReg [07:19:32:750]: System.IO.FileNotFoundException: Could not load file or assembly 'C:\WINDOWS\system32\wbem\mofcomp.exe' or one of its dependencies. 系统找不到指定的文件。The system cannot find the file specified.

    文件名:'C:\WINDOWS\system32\wbem\mofcomp.exeFile name: 'C:\WINDOWS\system32\wbem\mofcomp.exe

若要解决前面说明的问题,必须按照以下步骤操作。The following steps must be followed to resolve the problem described previously.

  1. 运行WMI 诊断实用程序,版本 2.0以修复 WMI 服务。Run the WMI Diagnosis Utility, version 2.0 to repair the WMI service. 有关使用此工具的详细信息,请参阅WMI 诊断实用程序主题。For more information about using this tool, see the WMI Diagnosis Utility topic.

使用修复安装.NET Framework 3.0添加/删除程序小程序位于控制面板,或卸载/重新安装.NET Framework 3.0。Repair the .NET Framework 3.0 installation by using the Add/Remove Programs applet located in Control Panel, or uninstall/reinstall the .NET Framework 3.0.

在安装 .NET Framework 3.5 后修复 .NET Framework 3.0 会移除 .NET Framework 3.5 在 machine.config 中引入的配置元素Repairing .NET Framework 3.0 after .NET Framework 3.5 Installation Removes Configuration Elements Introduced by .NET Framework 3.5 in machine.config

如果在安装 .NET Framework 3.5.NET Framework 3.5 后修复 .NET Framework 3.0,则会从 machine.config 中移除由 .NET Framework 3.5.NET Framework 3.5 引入的配置元素。If you do a repair of .NET Framework 3.0 after you installed .NET Framework 3.5.NET Framework 3.5, configuration elements introduced by .NET Framework 3.5.NET Framework 3.5 in machine.config are removed. 但是,web.config 保持不变。However, the web.config remains intact. 解决方法是修复.NET Framework 3.5.NET Framework 3.5此后通过 ARP 或使用工作流服务注册工具 (WFServicesReg.exe)/c切换。The workaround is to repair .NET Framework 3.5.NET Framework 3.5 after this via ARP, or use the WorkFlow Service Registration Tool (WFServicesReg.exe) with the /c switch.

工作流服务注册工具 (WFServicesReg.exe)位于 %windir%\Microsoft.NET\framework\v3.5\ 或 %windir%\Microsoft.NET\framework64\v3.5\WorkFlow Service Registration Tool (WFServicesReg.exe) can be found at %windir%\Microsoft.NET\framework\v3.5\ or %windir%\Microsoft.NET\framework64\v3.5\

安装 .NET Framework 3.5 之后,为 WCF/WF Webhost 正确配置 IISConfigure IIS Properly for WCF/WF Webhost after Installing .NET Framework 3.5

.NET Framework 3.5.NET Framework 3.5安装无法配置其他与 WCF 相关的 IIS 配置设置,它在安装日志中记录错误并继续。When .NET Framework 3.5.NET Framework 3.5 installation fails to configure additional WCF-related IIS configuration settings, it logs an error in the installation log and continues. 对运行 WorkflowServices 应用程序的任何尝试都将失败,因为缺少必需的配置设置。Any attempt to run WorkflowServices applications will fail, since the required configuration settings are missing. 例如,加载 xoml 或规则服务会失败。For example, loading xoml or rules service can fail.

解决此问题,请使用工作流服务注册工具 (WFServicesReg.exe)/c切换到在计算机上正确配置 IIS 脚本映射。To workaround this problem, use the WorkFlow Service Registration Tool (WFServicesReg.exe) with the /c switch to properly configure IIS script maps on the machine. 工作流服务注册工具 (WFServicesReg.exe)位于 %windir%\Microsoft.NET\framework\v3.5\ 或 %windir%\Microsoft.NET\framework64\v3.5\WorkFlow Service Registration Tool (WFServicesReg.exe) can be found at %windir%\Microsoft.NET\framework\v3.5\ or %windir%\Microsoft.NET\framework64\v3.5\

无法从程序集“System.ServiceModel, Version 3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”加载类型“System.ServiceModel.Activation.HttpModule”Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version 3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089’

如果发生此错误.NET Framework 4.NET Framework 4安装,然后启用 WCF HTTP 激活。This error occurs if .NET Framework 4.NET Framework 4 is installed and then WCF HTTP Activation is enabled. 若要解决此问题,运行以下命令行从内部开发人员命令提示中为 Visual Studio:To resolve the issue run the following command-line from inside the Developer Command Prompt for Visual Studio:

aspnet_regiis.exe -i -enable  

请参阅See also