次の方法で共有


<webHttpEndpoint>

この構成要素は、<> 動作を自動的に追加する固定<webHttpBinding> バインディングを持つ標準エンドポイントを定義します。 REST サービスを記述するときは、このエンドポイントを使用します。

<configuration>
  <system.serviceModel>
    <standardEndpoints>
      <webHttpEndpoint>

構文

<system.serviceModel>
  <standardEndpoints>
    <webHttpEndpoint>
      <standardEndpoint automaticFormatSelectionEnabled="String"
                        defaultOutgoingResponseFormat="Xml/Json"
                        helpEnabled="Boolean"
                        webEndpointType="String" />
    </webHttpEndpoint>
  </standardEndpoints>
</system.serviceModel>

属性および要素

以降のセクションでは、属性、子要素、および親要素について説明します。

Attributes

特性 Description
automaticFormatSelectionEnabled 書式の自動選択が有効かどうかを示すブール値。

自動フォーマット選択が有効になっている場合、インフラストラクチャは要求メッセージの Accept ヘッダーを解析し、最も適切な応答形式を決定します。 Accept ヘッダーで適切な応答形式が指定されていない場合、インフラストラクチャは要求メッセージのContent-Typeまたは操作の既定の応答形式を使用します。
defaultOutgoingResponseFormat 既定の送信応答形式を指定する属性。 この属性は WebMessageFormat 型です
helpEnabled エンドポイントに対して HTTP ヘルプ ページが有効になっているかどうかを示すブール値。
webEndpointType エンドポイントの種類を指定する文字列。

子要素

なし。

親要素

要素 Description
<standardEndpoints> 1 つ以上のプロパティ (アドレス、バインディング、コントラクト) が固定された定義済みのエンドポイントである標準エンドポイントのコレクション。

こちらも参照ください