구성 파일을 사용하여 모니터링 구성

Web.config는 Windows Server AppFabric에서 호스트되는 웹 응용 프로그램에 대한 모니터링 구성 정보를 저장하는 XML 파일입니다. 응용 프로그램의 주 Web.config 파일은 웹 응용 프로그램의 루트 디렉터리에 있습니다. ASP.NET은 계층 구조식 구성 체계를 사용하여 구성 정보를 분리합니다. 이 분리를 통해 다른 구성 파일의 구성 설정을 상속하여 하위 디렉터리에서 실제 Web.config 항목을 최소화할 수 있습니다.

구성 변경이 주 Web.config 파일에 커밋되면 응용 프로그램 도메인이 자동으로 재활용됩니다. 경우에 따라 이 동작이 바람직하지 않을 수 있습니다. 응용 프로그램 도메인의 재활용을 방지하려면 응용 프로그램의 주 구성 정보를 응용 프로그램의 Web.config 파일과 별개인 추가 파일로 분리합니다. 구성 섹션은 주 Web.config 파일과 같은 디렉터리에 있는 별도 파일로 이동됩니다. 그런 다음 .NET Framework 버전 4 속성 SectionInformation::ConfigSource(https://go.microsoft.com/fwlink/?LinkId=183510)를 사용하여 주 Web.config 파일 내에서 참조됩니다.

모니터링 관련 구성 정보를 주 Web.config 파일에서 연결된 구성 파일로 분리하는 단계는 다음과 같습니다.

구성 정보를 별도의 구성 파일로 이동하려면 다음을 수행합니다.

  1. diagnostics 섹션을 DiagnosticsConfigSource.config라는 별도의 구성 파일로 이동합니다.

    주 응용 프로그램의 Web.config 파일 별도의 DiagnosticsConfigSource.config 파일
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    

    <system.serviceModel> <diagnostics configSource="DiagnosticsConfigSource.config" /> </system.serviceModel>

    </configuration>

    <?xml version="1.0" encoding="UTF-8"?>
    <diagnostics etwProviderId="e8a6636e-1213-497e-b5c5-5350627e719e">
    <endToEndTracing propagateActivity="false" messageFlowTracing="false" />
    </diagnostics>
  2. behaviors 섹션을 ServiceBehaviorsConfigSource.config라는 별도의 구성 파일로 이동합니다.

    주 응용 프로그램의 Web.config 파일 별도의 ServiceBehaviorsConfigSource.config 파일
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    

    <system.serviceModel> <diagnostics configSource="DiagnosticsConfigSource.config" /> <behaviors configSource="ServiceBehaviorsConfigSource.config" /> </system.serviceModel>

    </configuration>

    <?xml version="1.0" encoding="UTF-8"?>
    <behaviors>
    <serviceBehaviors>
    <behavior name="">
    <etwTracking profileName="EndToEndMonitoring Tracking Profile" />
    </behavior>
    </serviceBehaviors>
    </behaviors>
  3. microsoft.applicationServer 섹션을 MonitoringEventCollector.config라는 별도의 구성 파일로 이동합니다.

    주 응용 프로그램의 Web.config 파일 별도의 MonitoringEventCollector.config 파일
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
    

    <microsoft.applicationServer> <monitoring configSource="MonitoringEventCollector.config" /> </microsoft.applicationServer>

    <system.serviceModel> <diagnostics configSource="DiagnosticsConfigSource.config" /> <behaviors configSource="ServiceBehaviorsConfigSource.config" /> </system.serviceModel>

    </configuration>

    <?xml version="1.0" encoding="UTF-8"?>
    <monitoring>
    <default enabled="true" connectionStringName="ApplicationServerMonitoringConnectionString" monitoringLevel="HealthMonitoring" />
    </monitoring>

참고

이러한 별도의 파일 이름은 임의로 지정할 수 있습니다. 단, 실제 구성 파일 이름은 주 Web.config 파일에서 configSource 속성을 사용하여 정의된 대로 이름과 정확히 일치해야 합니다.

참고

이러한 파일은 AppFabric 사용자 인터페이스에서 응용 프로그램의 모니터링 수준이 변경될 때 자동으로 수정됩니다.

  2011-12-05