0

I have a problem where WCF is reporting...

net.pipe://192.168.0.100/SystemA/Service1.svc/mexPipe' could not be activated.

I have defined my base addresses as follows:

Service 1...

<baseAddresses>
    <add baseAddress="http://192.168.0.100:8050/ProductsService/Service1.svc" />
    <add baseAddress="net.tcp://192.168.0.100:8051/ProductsService/Service1.svc" />
    <add baseAddress="net.pipe://192.168.0.100/ProductsService/Service1.svc" />
</baseAddresses>

Service 2...

<baseAddresses>
    <add baseAddress="http://192.168.0.100:8050/ProductsService/Service2.svc" />
    <add baseAddress="net.tcp://192.168.0.100:8051/ProductsService/Service2.svc" />
    <add baseAddress="net.pipe://192.168.0.100/ProductsService/Service2.svc" />
</baseAddresses>

For each service I then define Mex endpoints as follows...

<endpoint address="mexPipe" contract="IMetadataExchange" binding="mexNamedPipeBinding" />

This should surely give me 2x mex endpoints as follows...

net.pipe://192.168.0.100/ProductsService/Service1.svc/mexPipe
net.pipe://192.168.0.100/ProductsService/Service2.svc/mexPipe

However I dont think that this is working looking at this post...

net.tcp binding metadata problem

The poster appears to have a similar configuration to me and the responder states that the base addresses are not "unique" within each scheme - but surely they are as they both reference two unique services?

Can WCF detect that my mex end points are netNamedPipe and look up the base address for them? Given that the binding is "mexNamedPipeBinding" - or doesnt this work?

Community
  • 1
  • 1
Remotec
  • 10,304
  • 25
  • 105
  • 147

1 Answers1

1

Your base addresses aren't supposed to include the service file name. You'll specify that in the endpoint declaration.

As you can see, your enpoints are:

net.pipe://192.168.0.100/ProductsService/Service1.svc/mexPipe net.pipe://192.168.0.100/ProductsService/Service2.svc/mexPipe

Which most certainly can't be correct as the service file doesn't have a folder in it for the mex endpoint.

Instead, define your base address as:

<baseAddresses>
  <add baseAddress="net.pipe://192.168.0.100/ProductsService" />
</baseAddresses>

and your endpoint as:

<endpoint address="mexPipe" contract="IMetadataExchange" ... />

and you'll find that your mex endpoint becomes:

net.pipe://192.168.0.100/ProductsService/mexPipe

Which looks about right.

Steven Evers
  • 16,649
  • 19
  • 79
  • 126