Reputation: 10758
For some reason I cannot get the Net.Pipe endpoint (EP) of my service working.
This is a .Net 4.0 WCF Service hosted in IIS7.
There are two faults...
I think both are actually related to the same problem.
The actual error received is...
There was no endpoint listening at net.pipe://[machinename].[domainname]/Services/TestService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.
The first thing I have noticed is that no matter what I call my pipe in the base addresses it gets renamed to [machinename].[domainname] which seems strange. This is evident in the service Meta data that is output. However, if I use my pipe name or this renamed name in the test client neither will work.
I have also, enabled WAS in Windows Features, set the site bindings for all protocols in IIS and also typed in the names of the protocols in the "Enabled Protocols" box in IIS (http, net.tcp, net.pipe). I have also checked that the "Net.Pipe listener adaptor" is started in Windows Servics.
My http and net.tcp EP's both work fine and return Meta Data.
My config is listed below - has anyone got any idea what could be stopping this EP from working?? I'm pretty sure its something simple!!
<system.serviceModel>
<behaviors>
<!-- EP Behaviors -->
<endpointBehaviors>
<behavior name="PayloadMessageInspector">
<MessageHeaderBehavior />
<MessagePayloadBehavior />
</behavior>
</endpointBehaviors>
<!-- Service Behaviors -->
<serviceBehaviors>
<behavior name="GenericServiceBehavior">
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceMetadata httpGetEnabled="true" policyVersion="Policy15" />
</behavior>
</serviceBehaviors>
</behaviors>
<!-- Bindings Section -->
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<bindings>
<!-- Basic Http Binding -->
<basicHttpBinding>
<binding maxReceivedMessageSize="10485760" maxBufferSize="10485760" maxBufferPoolSize="10485760">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows" />
</security>
</binding>
</basicHttpBinding>
<!-- Net TCP Binding -->
<netTcpBinding>
<binding maxReceivedMessageSize="10485760" maxBufferSize="10485760" maxBufferPoolSize="10485760" />
</netTcpBinding>
<!-- Net Pipe Binding -->
<netNamedPipeBinding>
<binding maxReceivedMessageSize="10485760" maxBufferSize="10485760" maxBufferPoolSize="10485760" />
</netNamedPipeBinding>
</bindings>
<!-- Services Section -->
<services>
<!-- Membership Service -->
<service name="TestService" behaviorConfiguration="GenericServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost/Services/TestService.svc" />
<add baseAddress="net.tcp://localhost/Services/TestService.svc"/>
<add baseAddress="net.pipe://Dev/Services/TestService.svc"/>
</baseAddresses>
</host>
<!-- HTTP -->
<endpoint
address=""
binding="basicHttpBinding"
contract="ITestService" name="TestServiceBasicHttp" behaviorConfiguration="PayloadMessageInspector" />
<!-- NetTCP -->
<endpoint
address=""
binding="netTcpBinding"
contract="ITestService" name="TestServiceNetTcp" behaviorConfiguration="PayloadMessageInspector" />
<!-- NetPipe -->
<endpoint
address=""
binding="netNamedPipeBinding"
contract="ITestService" name="TestServiceNetPipe" behaviorConfiguration="PayloadMessageInspector" />
<!-- Mex (Net.Tcp / Net.Pipe ) -->
<endpoint name="TestServiceNetTcpMex" address="mex" binding="mexTcpBinding" contract="IMetadataExchange" />
<endpoint name="TestServiceNetPipeMex" address="mex" binding="mexNamedPipeBinding" contract="IMetadataExchange" />
</service>
</services>
<!-- Extensions -->
<extensions>
<behaviorExtensions>
<add name="MessageHeaderBehavior" type="ServiceMessageHeaderBehavior, TestService.Logging" />
<add name="MessagePayloadBehavior" type="ServiceMessagePayloadBehavior, TestService.Logging" />
</behaviorExtensions>
</extensions>
</system.serviceModel>
Upvotes: 2
Views: 4572
Reputation: 4303
The WCF test client was able to see my named pipe endpoint after I added the following mex endpoint:
By looking at the configuration that the test client generated, I discovered that I had my client's endpoint address wrong. This ended up working for me...
net.pipe://localhost/{webapproot}/{path}/ServiceName.svc/{relativeaddress}
I hope this helps someone.
Upvotes: 1