工作流服务注册工具 (WFServicesReg.exe)WorkFlow Service Registration Tool (WFServicesReg.exe)

工作流服务注册工具 (WFServicesReg.exe) 是一个独立的工具,可用于添加、移除或修复 Windows Workflow Foundation (WF) 服务的配置元素。Workflow Services Registration tool (WFServicesReg.exe) is a stand-alone tool that can be used to add, remove, or repair the configuration elements for Windows Workflow Foundation (WF) services.

语法Syntax

WFServicesReg.exe [-c | -r | -v | -m | -i]  

备注Remarks

该工具可以在 .NET Framework 3.5.NET Framework 3.5 安装位置(具体为 %windir%\Microsoft.NET\Framework\v3.5)或 64 位计算机上的 %windir%\Microsoft.NET\Framework64\v3.5 中找到。The tool can be found at the .NET Framework 3.5.NET Framework 3.5 installation location, specifically, %windir%\Microsoft.NET\Framework\v3.5, or at %windir%\Microsoft.NET\Framework64\v3.5 in 64-bit machines.

下表说明了可用于工作流服务注册工具 (WFServicesReg.exe) 的选项。The following tables describe the options that can be used with the Workflow Services Registration tool (WFServicesReg.exe).

选项Option 描述Description
/c 配置 Windows Workflow Services。Configures Windows Workflow Services. 在安装和修复方案中使用。Used in install and repair scenarios.
/r 移除 Windows Workflow Services 配置。Removes Windows Workflow Services Configuration.
/v 打印详细信息(针对配置或移除)。Print verbose information (for either configuration or removal).
/m 启用 MSI 日志记录格式。Enables MSI logging format.
/i 应用程序运行时最小化窗口。Minimizes the window when the application runs.

注册Registration

该工具检查 Web.config 文件并注册以下内容:The tool inspects the Web.config file and registers the following:

  • .NET Framework 3.5.NET Framework 3.5 引用程序集。reference assemblies.

  • 用于 .xoml 文件的生成提供程序。A build provider for .xoml files.

  • 用于 .xoml 和 .rules 文件的 HTTP 处理程序。HTTP handlers for .xoml and .rules files.

该工具检查 Machine.config 文件并注册以下扩展:The tool inspects the Machine.config file and registers the following extensions:

  • behaviorExtensionsbehaviorExtensions

  • bindingElementExtensionsbindingElementExtensions

  • bindingExtensionsbindingExtensions

该工具还注册以下客户端元数据导入程序:The tool also registers the following client metadata importers:

  • policyImporterspolicyImporters

  • wsdlImporterswsdlImporters

该工具还在 IIS 元数据库中注册 .xoml 和 .rules 脚本映射和处理程序。The tool also registers .xoml and .rules scriptmaps and handlers in the IIS metabase.

Windows Server 2003Windows Server 2003Windows XPWindows XP计算机 (iis 5.1 和 iis 6.0) 上, 注册了一组 xoml 和. 规则脚本映射。On Windows Server 2003Windows Server 2003 and Windows XPWindows XP machines (IIS 5.1 and IIS 6.0), one set of .xoml and .rules scriptmaps are registered.

在 64 位计算机上,如果启用 Enable32BitAppOnWin64 开关,则该工具注册 WOW 模式脚本映射;如果禁用 Enable32BitAppOnWin64 开关,则该工具注册本机 64 位模式脚本映射。On 64-bit machines, the tool registers WOW mode scriptmaps if the Enable32BitAppOnWin64 switch is enabled, or native 64-bit scriptmaps if the Enable32BitAppOnWin64 switch is disabled.

Windows VistaWindows Vista和 Windows Server 2008 (IIS 7.0 及更高版本) 计算机上, 注册了两组 xoml 和. 规则处理程序: 一个用于集成模式, 另一个用于经典模式。On Windows VistaWindows Vista and Windows Server 2008 (IIS 7.0 and above) machines, two sets of .xoml and .rules handlers are registered: one for Integrated mode and one for Classic mode.

在 64 位计算机上,注册三组处理程序(无论 Enable32BitAppOnWin64 开关处于什么状态):一组用于集成模式,一组用于 WOW 经典模式,一组用于本机 64 位经典模式。On 64-bit machines, three sets of handlers are registered (regardless of the state of the Enable32BitAppOnWin64 switch): one for Integrated mode, one for WOW Classic mode and one for native 64-bit Classic mode.

备注

与 ServiceModelreg.exe 不同,WFServicesReg.exe 不允许添加、移除和修复特定网站的脚本映射或处理程序。Unlike ServiceModelreg.exe, WFServicesReg.exe does not allow adding, removing, or repairing scriptmaps or handlers for a particular Web site. 有关此问题的解决方法,请参见“修复脚本映射”一节。For a workaround to this issue, see the "Repairing the Scriptmaps" section.

使用方案Usage Scenarios

安装 .NET Framework 3.5 之后安装 IISInstalling IIS after .NET Framework 3.5 is installed

Windows Server 2003Windows Server 2003 计算机上,在安装 IIS 之前应安装 .NET Framework 3.5.NET Framework 3.5On a Windows Server 2003Windows Server 2003 machine, .NET Framework 3.5.NET Framework 3.5 is installed prior to IIS installation. 由于 IIS 元数据库不可用,.NET Framework 3.5.NET Framework 3.5 安装将在不安装 .xoml 和 .rules 脚本映射的情况下成功完成。Due to the unavailability of the IIS metabase, installation of .NET Framework 3.5.NET Framework 3.5 succeeds without installing .xoml and .rules scriptmaps.

安装 IIS 后,可以使用具有 /c 开关的 WFServicesReg.exe 工具来安装这些特定的脚本映射。After IIS is installed, you can use the WFServicesReg.exe tool with the /c switch to install these specific scriptmaps.

修复脚本映射Repairing the Scriptmaps

删除了网站节点下的脚本映射Scriptmap deleted under Web Sites node

Windows Server 2003Windows Server 2003 计算机上,从网站节点中意外删除了 .xoml 或 .rules。On a Windows Server 2003Windows Server 2003 machine, .xoml or .rules is accidentally deleted from the Web Sites node. 通过运行具有 /c 开关的 WFServicesReg.exe 工具可以修复这个问题。This can be repaired by running the WFServicesReg.exe tool with the /c switch.

删除了特定网站下的脚本映射Scriptmap deleted under a particular Web site

Windows Server 2003Windows Server 2003 计算机上,从特定网站(如默认网站)而不是网站节点中意外删除了 .xoml 或 .rules。On a Windows Server 2003Windows Server 2003 machine, .xoml or .rules is accidentally deleted from a particular Web site (for example, the Default Web Site) rather than from the Web Sites node.

若要修复特定网站的已删除处理程序, 您应运行 "Wfservicesreg.exe/r" 以从所有网站中删除处理程序, 然后运行 "Wfservicesreg.exe/c" 为所有网站创建适当的处理程序。To repair deleted handlers for a particular Web site, you should run "WFServicesReg.exe /r" to remove handlers from all Web sites, then run "WFServicesReg.exe /c" to create the appropriate handlers for all Web sites.

切换 IIS 模式后配置处理程序Configuring handlers after switching IIS mode

当 IIS 处于共享配置模式并且已安装 .NET Framework 3.5.NET Framework 3.5 时,IIS 元数据库将配置在共享位置下。When IIS is in shared configuration mode and .NET Framework 3.5.NET Framework 3.5 is installed, the IIS metabase is configured under a shared location. 如果将 IIS 切换到非共享配置模式,则本地元数据库将不包含必需的处理程序。If you switch IIS to non-shared configuration mode, the local metabase will not contain the required handlers. 若要正确配置本地元数据库, 你可以将共享元数据库导入到本地, 或运行 "Wfservicesreg.exe/c", 这将配置本地元数据库。To configure the local metabase properly, you can either import the shared metabase to local, or run "WFServicesReg.exe /c", which configures the local metabase.