<protocolMapping>

トランスポート プロトコル スキーム (http、net.tcp、net.pipe など) と WCF バインディング間の既定のプロトコル マッピング セットを定義する構成セクションを表します。実行時に既定のエンドポイントを作成するときに、Windows Communication Foundation (WCF) は構成されたマッピングを確認し、特定のベース アドレスに使用するバインディングを決定します。

スキーマの階層

<system.serviceModel>
  <protocolMapping>

構文

   <protocolMapping>    <add binding="String”         bindingConfiguration="String”         scheme="http/net.msmq/net.pipe/net.tcp"/></protocolMapping>

属性と要素

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

属性

なし。

子要素

要素 説明

<routing> の <filters>

トランスポート プロトコル スキーム (http、net.tcp、net.pipe など) と WCF バインディング間の既定のプロトコル マッピングを格納します。 

親要素

要素 説明

system.ServiceModel

すべての WCF 構成要素のルート要素です。

次の構成例は、machine.config ファイル内の既定のプロトコル マッピングを示しています。machine.config ファイルを変更することで、既定のマッピングをコンピューター レベルでオーバーライドできます。または、アプリケーションのスコープ内だけでオーバーライドする場合は、アプリケーション構成ファイルのこのセクションをオーバーライドし、各プロトコル スキームのマッピングを変更できます。

    
<protocolMapping>
        <add scheme="http" binding="basicHttpBinding"/>
        <add scheme="net.tcp" binding="netTcpBinding"/>
        <add scheme="net.pipe" binding="netNamedPipeBinding"/>
        <add scheme="net.msmq" binding="netMsmqBinding"/>
</protocolMapping>

参照

リファレンス

System.ServiceModel.Configuration.ProtocolMappingSection
System.ServiceModel.Configuration.ProtocolMappingElement