I have a service available through http and net.pipe. It is hosted on IIS 7 (Server 2008). I can host different instances of this service for multiple clients on the same computer, and therefore HTTP is configured with virtual host names, etc. It all works fine.
I thought that I would do this to bind the necessary network using some form of virtual client host in a named base address, which allows me to access different client instances with different net.pipe urns (I understand the names of net.pipe are URN, and not URLs, so they can be almost arbitrary, but I thought I would follow a similar pattern with HTTP addresses).
Here is my web.config
<service name="Administration" behaviorConfiguration="AdministrationBehavior"> <endpoint address="" binding="wsHttpBinding" bindingConfiguration="normalWsBinding" contract="IAdministration" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <endpoint address="" binding="netNamedPipeBinding" bindingConfiguration="normalNetNamedPipeBinding" contract="IAdministration" /> <endpoint address="mex" binding="mexNamedPipeBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="http://virtualhostname.com/service" /> <add baseAddress="net.pipe://virtualhostname.com/administration/service" /> </baseAddresses> </host> </service>
However, when accessing the WSDL for the service - the base address for net.pipe seems to be IIS ignored. Instead, I get the real hostname of the machine and net.pipe address URN, which seems to be fully formatted by IIS.
<wsdl:port name="NetNamedPipeBinding_IAdministration" binding="tns:NetNamedPipeBinding_IAdministration"> <soap12:address location="net.pipe://realhostname/service/Administration.svc"/> <wsa10:EndpointReference> <wsa10:Address>net.pipe://realhostname.com/service/Administration.svc</wsa10:Address> <Identity> <Spn>host/realhostname.com</Spn> </Identity> </wsa10:EndpointReference> </wsdl:port>
Without control over how net.pipe names are generated, I will not recognize between multiple instances of customer service on the machine. Does anyone know how a network-linked URN can be controlled in an IIS environment?
(I do a lot of autonomous hosting of net.pipe during testing (i.e. the new ServiceHost ()) so I know that my net.pipe bindings work outside of IIS and allow me to control the exact named URN pipe)
If the names cannot be controlled in IIS - does anyone have experience with hosting and access to several separate instances of the net.pipe service on the same machine?
iis named-pipes wcf
Andrew Patterson
source share