開発サーバーは HTTP ( http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c7f173ea-61dc-4338-8883-60d616adc18f/ )以外のバインディングの使用をサポートしていないため、では、NetNamedPipeBinding をどのようにデバッグするのでしょうか?
現在、Microsoft Service Configuration Editor でバインド タイプを basicHttpBinding から netNamedPipeBinding に変更すると、F5 キーを押してポップアップする自動生成された WCF ツールを使用しようとすると、次のエラー メッセージが表示されます。
System.InvalidOperationException: NetNamedPipeBinding をバインドするエンドポイントのスキーム net.pipe に一致するベース アドレスが見つかりませんでした。登録されているベース アドレス スキームは [http] です。System.ServiceModel.ServiceHostBase.MakeAbsoluteUri (Uri relativeOrAbsoluteUri、Binding binding、UriSchemeKeyedCollection baseAddresses) で System.ServiceModel.Description.ConfigLoader.LoadServiceDescription (ServiceHostBase ホスト、ServiceDescription 説明、ServiceElement serviceElement、Action`1 addBaseAddress) で System.ServiceModel.ServiceHostBase. System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader、ServiceDescription の説明、
構成:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
</configSections>
<system.web>
<compilation debug="true" />
</system.web>
<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.serviceModel>
<bindings>
<netNamedPipeBinding>
<binding name="NewBinding0" />
</netNamedPipeBinding>
</bindings>
<services>
<service behaviorConfiguration="InventoryServiceLibrary.Service1Behavior"
name="InventoryServiceLibrary.InventoryService">
<endpoint address="" binding="netNamedPipeBinding" bindingConfiguration=""
contract="InventoryServiceLibrary.IInventoryService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8731/Design_Time_Addresses/InventoryServiceLibrary/Service1/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="InventoryServiceLibrary.Service1Behavior">
<!-- To avoid disclosing metadata information,
set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
解決策 名前付きパイプ バインディングを作成した後にベース アドレスを追加する