Поскольку сервер разработки не поддерживает использование каких-либо привязок помимо HTTP (http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c7f173ea-61dc-4338-8883-60d616adc18f/), то как отлаживать NetNamedPipeBinding?Отладка именованных каналов в WCF
Прямо сейчас, когда я изменяю тип привязки с помощью редактора конфигурации службы Microsoft от basicHttpBinding до netNamedPipeBinding, появляется следующее сообщение об ошибке, когда я пытаюсь нажать F5, чтобы всплывать автоматически созданный инструмент WCF.
System.InvalidOperationException: Не удалось найти базовый адрес, соответствующий схеме net.pipe для конечной точки с привязкой NetNamedPipeBinding. Схемы зарегистрированных базовых адресов: [http]. на System.ServiceModel.ServiceHostBase.MakeAbsoluteUri (Uri relativeOrAbsoluteUri, Связывание связывания, UriSchemeKeyedCollection baseAddresses) в System.ServiceModel.Description.ConfigLoader.LoadServiceDescription (ServiceHostBase хозяина, описание ServiceDescription, ServiceElement serviceElement, Action`1 addBaseAddress) в System.ServiceModel .ServiceHostBase.LoadConfigurationSectionInternal (configLoader configLoader, описание ServiceDescription, ServiceElement serviceSection) на System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal (configLoader configLoader, описание ServiceDescription, Строка ConfigurationName) на System.ServiceModel.ServiceHostBase.ApplyConfiguration() в System.ServiceModel. ServiceHostBase.InitializeDescription (UriSchemeKeyedCollection baseAddresses)в System.ServiceModel.ServiceHost.InitializeDescription (тип ServiceType, UriSchemeKeyedCollection baseAddresses) в System.ServiceModel.ServiceHost..ctor (тип ServiceType, Uri [] baseAddresses) в Microsoft.Tools.SvcHost.ServiceHostHelper.CreateServiceHost (Тип, ServiceKind вид) на Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService (ServiceInfo информация)
Config:
<?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>
Решение Добавить базовый адрес после создания именованного связывания каналов
У вас есть базовый адрес «net.pipe»? –
Я полагаю, что чистые трубы WCF не поддерживают перекрестные машинные вызовы - пытаетесь ли вы это сделать? –
Я не могу найти способ установить net.pipe в Редактор конфигурации. Нет, я хочу только поговорить между двумя процессами на одном компьютере. –