如何在 Azure 下的 Windows Server 2012 R2 下向 IIS 添加 Tracing

How to add Tracing to IIS under Windows Server 2012 R2 under Azure

我们目前正在努力将 Tracing 添加到 Azure 下的 Windows Server 2012 R2 上的角色。我们一直在研究过程的 Avanti's 描述,但在大约 2/3 的过程中始终遇到失败。我们到达“Web 服务器 (IIS) > Web 服务器 > 健康和诊断 > 跟踪”的“功能安装”屏幕,只出现以下文本:

The request to add or remove features on the specified server failed. Installation of one or more roles, role services, or features failed. Error: 0x800f0922

下面提供了 DeploymentConfigTemplate.xml 的略微编辑版本,以防它有意义:

<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04">
    <Obj RefId="0">
        <TN RefId="0">
            <T>System.Collections.ObjectModel.Collection`1[[System.Management.Automation.PSObject, System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]</T>
            <T>System.Object</T>
        </TN>
        <LST>
            <Obj RefId="1">
                <TN RefId="1">
                    <T>Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/ServerManager/ServerComponent_Web_Http_Tracing</T>
                    <T>Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/ServerManager/MSFT_ServerManagerServerComponentDescriptor</T>
                    <T>Microsoft.Management.Infrastructure.CimInstance#ServerComponent_Web_Http_Tracing</T>
                    <T>Microsoft.Management.Infrastructure.CimInstance#MSFT_ServerManagerServerComponentDescriptor</T>
                    <T>Microsoft.Management.Infrastructure.CimInstance</T>
                    <T>System.Object</T>
                </TN>
                <ToString>ServerComponent_Web_Http_Tracing</ToString>
                <Props>
                    <S N="PSComputerName">SOME-COMPUTER-NAME</S>
                </Props>
                <MS>
                    <I32 N="NumericId">159</I32>
                    <Obj N="__ClassMetadata" RefId="2">
                        <TN RefId="2">
                            <T>System.Collections.ArrayList</T>
                            <T>System.Object</T>
                        </TN>
                        <LST>
                            <Obj RefId="3">
                                <MS>
                                    <S N="ClassName">MSFT_ServerManagerServerComponentDescriptor</S>
                                    <S N="Namespace">ROOT/Microsoft/Windows/ServerManager</S>
                                    <S N="ServerName">SOME-COMPUTER-NAME</S>
                                    <I32 N="Hash">1884695400</I32>
                                    <S N="MiXml">&lt;CLASS NAME="MSFT_ServerManagerServerComponentDescriptor"&gt;&lt;QUALIFIER NAME="dynamic" TYPE="boolean"&gt;&lt;VALUE&gt;true&lt;/VALUE&gt;&lt;/QUALIFIER&gt;&lt;QUALIFIER NAME="locale" TYPE="sint32" TOSUBCLASS="false"&gt;&lt;VALUE&gt;1033&lt;/VALUE&gt;&lt;/QUALIFIER&gt;&lt;QUALIFIER NAME="provider" TYPE="string"&gt;&lt;VALUE&gt;deploymentprovider&lt;/VALUE&gt;&lt;/QUALIFIER&gt;&lt;/CLASS&gt;</S>
                                </MS>
                            </Obj>
                            <Obj RefId="4">
                                <MS>
                                    <S N="ClassName">ServerComponent_Web_Http_Tracing</S>
                                    <S N="Namespace">ROOT/Microsoft/Windows/ServerManager</S>
                                    <S N="ServerName">SOME-COMPUTER-NAME</S>
                                    <I32 N="Hash">1983160024</I32>
                                    <S N="MiXml">&lt;CLASS NAME="ServerComponent_Web_Http_Tracing" SUPERCLASS="MSFT_ServerManagerServerComponentDescriptor"&gt;&lt;QUALIFIER NAME="dynamic" TYPE="boolean"&gt;&lt;VALUE&gt;true&lt;/VALUE&gt;&lt;/QUALIFIER&gt;&lt;QUALIFIER NAME="provider" TYPE="string"&gt;&lt;VALUE&gt;deploymentprovider&lt;/VALUE&gt;&lt;/QUALIFIER&gt;&lt;QUALIFIER NAME="ClassVersion" TYPE="string"&gt;&lt;VALUE&gt;0.0.0&lt;/VALUE&gt;&lt;/QUALIFIER&gt;&lt;QUALIFIER NAME="DisplayName" TYPE="string" TRANSLATABLE="true"&gt;&lt;VALUE&gt;Web-Http-Tracing&lt;/VALUE&gt;&lt;/QUALIFIER&gt;&lt;/CLASS&gt;</S>
                                </MS>
                            </Obj>
                        </LST>
                    </Obj>
                </MS>
            </Obj>
        </LST>
    </Obj>
</Objs>

我们正在努力解决尽可能多的 7 Ways to 0x800f0922 Windows 10 Error 适用问题。欢迎其他建议。

稍后

C:\bin>sfc /scannow

Beginning system scan.  This process will take some time.

Beginning verification phase of system scan.
Verification 100% complete.

Windows Resource Protection found corrupt files but was unable to fix some
of them. Details are included in the CBS.Log windir\Logs\CBS\CBS.log. For
example C:\Windows\Logs\CBS\CBS.log. Note that logging is currently not
supported in offline servicing scenarios.

CBS.log 文件为 5.3MB。接下来可能会尝试 DISM。

C:\bin>DISM.exe /Online /Cleanup-image /Scanhealth

Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Image Version: 6.3.9600.17031

[==========================100.0%==========================]
No component store corruption detected.
The operation completed successfully.

C:\bin> DISM.exe /Online /Cleanup-image /Restorehealth

Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Image Version: 6.3.9600.17031

[==========================100.0%==========================]
The restore operation completed successfully. The component store corruption was repaired.
The operation completed successfully.

稍后

没有。还是不安装。有人有想法吗?

1)请确保您的计算机中有足够的 space。

2)删除 Windows Temp 文件夹(通常是 C:\Windows\Temp)的内容,然后再次尝试安装该功能。

3) 关闭私人和 public 网络的防火墙。

4)确保安装了最新版本的 NET Framework。

5)请运行Windows更新Server 2012R2上的疑难解答,检查是否可以解决问题

6) 尝试重新安装 Windows 进程激活服务。

7)确保在安装 IIS 功能时禁用共享配置。

完成所有操作后重新启动机器并再次尝试安装该功能。

为了能够呼叫支持,我们花了几天时间生成日志并将其发送给 Microsoft 支持工程师,得到以下说明:

... please create the folder C:\inetpub\logs\FailedReqLogFiles on your problematic machine. 
Then please right click this folder, choose Properties, then under Security tab, 
assign the following permissions:

System - Full Control
Administrators - Full Control 
IIS_IUSRS - List folder/read data, Create files/ write data, create folders/ append data, write attributes, write extend attributes, delete subfolders and files and delete.

这足以启用跟踪角色的安装。在这个过程中,一个特别困难和困扰的500问题消失了。所以在 hoo-hah 和 to-ing 和 fro-ing 之后,我们毕竟不必使用 FRT 模块。