ServiceDebugBehavior.HttpHelpPageEnabled 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
WCF(Windows Communication Foundation)가 속성에서 제어하는 주소에 HTML 도움말 페이지를 게시하는지 여부를 제어 HttpHelpPageUrl 하는 값을 가져오거나 설정합니다.
public:
property bool HttpHelpPageEnabled { bool get(); void set(bool value); };
public bool HttpHelpPageEnabled { get; set; }
member this.HttpHelpPageEnabled : bool with get, set
Public Property HttpHelpPageEnabled As Boolean
속성 값
trueWCF가 HTML 도움말 페이지를 게시하는 경우 그렇지 않으면 . false 기본값은 true입니다.
예제
다음 코드 예제에서는 구성 파일을 사용하여 HTML 도움말 페이지 기능을 사용하도록 설정하고 디버깅을 위해 SOAP 오류 내의 예외 정보를 클라이언트에 반환하는 방법을 보여 줍니다. 이 구성 파일은 기능에 대한 ServiceDebugBehavior 지원을 추가하는 다음 기본 단계를 보여줍니다.
형식이 구현이므로 서비스 형식을 나타내는 서비스 요소에는 동작 구성 식별자가 있습니다
behaviorConfiguration="metadataAndDebug">.<System.ServiceModel.Description.IServiceBehaviorServiceDebugBehavior형식이 ServiceDebugBehavior 구현<이므로 동작> 요소가serviceBehaviors> 섹션에< 추가됩니다.System.ServiceModel.Description.IServiceBehavior
name값이< 서비스 요소 특성의 식별자인 동작> 요소의 <특성입니다.>behaviorConfiguration이 경우 값은metadataAndDebug.다양한 특성이 원하는 구성으로 설정된 serviceDebug> 요소를 추가합니다.< 이 경우
httpHelpPageEnabled및includeExceptionDetailInFaults특성 값은 .로true설정됩니다.
<configuration>
<system.serviceModel>
<services>
<!--
Step 1. Add a behaviorConfiguration attribute
in the <service> element.
-->
<service
name="Microsoft.WCF.Documentation.SampleService"
behaviorConfiguration="metadataAndDebug">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/SampleService" />
</baseAddresses>
</host>
<endpoint
address=""
binding="wsHttpBinding"
contract="Microsoft.WCF.Documentation.ISampleService"
/>
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange"
/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<!--
Step 2. Inside a <serviceBehaviors> section, add
a name attribute in the <behaviors> element that
matches the behaviorConfiguration attribute in the
<service> element above.
-->
<behavior name="metadataAndDebug">
<serviceMetadata
httpGetEnabled="true"
httpGetUrl=""
/>
<!--
Step 3. Add a <serviceDebug> element and
modify the various attributes that suit your
scenario.
-->
<serviceDebug
httpHelpPageEnabled="true"
includeExceptionDetailInFaults="true"
/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
설명
HTML 브라우저에 HttpHelpPageEnabledfalse 표시되는 HTML 도움말 페이지의 게시를 사용하지 않도록 속성을 설정합니다.
HTML 도움말 페이지가 속성에 의해 HttpsHelpPageUrl 제어되는 위치에 게시되도록 하려면 이 속성을 true 설정해야 하며 다음 조건 중 하나도 true여야 합니다.
이 HttpsHelpPageUrl 속성은 HTTP 프로토콜 체계를 지원하는 절대 주소입니다.
HTTP 프로토콜 체계를 지원하는 서비스에 대한 기본 주소가 있습니다.
HTTP 프로토콜 체계를 지원하지 않는 절대 주소가 속성에 HttpsHelpPageUrl 할당된 경우 예외가 throw되지만 이전 조건을 충족하지 않는 다른 시나리오에서는 예외가 발생하지 않고 HTML 도움말 페이지도 없습니다.