Debugging von Named Pipes in WCF

Seit der Entwicklung der server unterstützt nicht die Benutzung von Bindungen außer HTTP (http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c7f173ea-61dc-4338-8883-60d616adc18f/), wie funktioniert dann eine debug-ein NetNamedPipeBinding?

Gerade jetzt, wenn ich die verbindliche Art, mit der Microsoft Service Configuration Editor von basicHttpBinding zu netNamedPipeBinding, dann bekomme ich die folgende Fehlermeldung, wenn ich versuche, drücken Sie F5, um den auto-generierten WCF-tool, das erscheint.

System.InvalidOperationException: Kann nicht finden, eine Basis-Adresse, die passt-Schema net.Leitung für den Endpunkt mit Bindung NetNamedPipeBinding. Eingetragene Basisadresse Systeme sind [http].
System.ServiceModel.ServiceHostBase.MakeAbsoluteUri(Uri relativeOrAbsoluteUri, Bindung, UriSchemeKeyedCollection baseAddresses)
System.ServiceModel.Beschreibung.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription Beschreibung ServiceElement serviceElement, Action`1 addBaseAddress)
System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription Beschreibung ServiceElement serviceSection)
System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, String configurationName)
System.ServiceModel.ServiceHostBase.ApplyConfiguration()
System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses)
System.ServiceModel.- ServiceHost.InitializeDescription(Typ Diensttyp, UriSchemeKeyedCollection baseAddresses)
System.ServiceModel.ServiceHost..ctor(Type-Diensttyp, Uri[] baseAddresses)
bei Microsoft.Tools.SvcHost.ServiceHostHelper.CreateServiceHost(Type Type, ServiceKind Art)
bei Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info)

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>

Lösung
Fügen Sie ein base-Adresse nach dem anlegen einer named pipe Bindung

  • Haben Sie eine net.pipe Basis-Adresse konfiguriert ist?
  • Ich glaube, dass WCF-net-Leitungen nicht unterstützen, cross-Maschine ruft - sind Sie versuchen zu tun, thse?
  • Ich kann nicht einen Weg finden, net.Rohr in den Konfigurations-Editor. Nein, ich möchte nur das Gespräch zwischen zwei Prozessen auf dem gleichen computer.
InformationsquelleAutor Zian Choy | 2009-08-20
Schreibe einen Kommentar