views:

999

answers:

2

Since the development server doesn't support the use of any bindings besides HTTP (http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/c7f173ea-61dc-4338-8883-60d616adc18f/), then how does one debug a NetNamedPipeBinding?

Right now, when I change the binding type with the Microsoft Service Configuration Editor from basicHttpBinding to netNamedPipeBinding, then I get the following error message when I try to hit F5 to use the auto-generated WCF tool that pops up.

System.InvalidOperationException: Could not find a base address that matches scheme net.pipe for the endpoint with binding NetNamedPipeBinding. Registered base address schemes are [http]. at System.ServiceModel.ServiceHostBase.MakeAbsoluteUri(Uri relativeOrAbsoluteUri, Binding binding, UriSchemeKeyedCollection baseAddresses) at System.ServiceModel.Description.ConfigLoader.LoadServiceDescription(ServiceHostBase host, ServiceDescription description, ServiceElement serviceElement, Action`1 addBaseAddress) at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, ServiceElement serviceSection) at System.ServiceModel.ServiceHostBase.LoadConfigurationSectionInternal(ConfigLoader configLoader, ServiceDescription description, String configurationName) at System.ServiceModel.ServiceHostBase.ApplyConfiguration() at System.ServiceModel.ServiceHostBase.InitializeDescription(UriSchemeKeyedCollection baseAddresses) at System.ServiceModel.ServiceHost.InitializeDescription(Type serviceType, UriSchemeKeyedCollection baseAddresses) at System.ServiceModel.ServiceHost..ctor(Type serviceType, Uri[] baseAddresses) at Microsoft.Tools.SvcHost.ServiceHostHelper.CreateServiceHost(Type type, ServiceKind kind) at Microsoft.Tools.SvcHost.ServiceHostHelper.OpenService(ServiceInfo info)

Config:

//would be here if StackOverflow would actually display XML...

Solution Add a base address after creating a named pipe binding

A: 

You could always just use Attach To Process instead of directly starting in the debugger and attach it to your host process.

tomasr
+1  A: 

Show us your config !! Both for the client and the server.

The message "Could not find a base address that matches scheme net.pipe for the endpoint with binding NetNamedPipeBinding." basically says it all - it would appear as if your server config does not contain any endpoints or base addresses that use the net.pipe binding:

<services>
   <service name="xxxx">
       <host>
           <baseAddresses>
               <add baseAddress="http://localhost:8000/MyService" />
               <add baseAddress="net.tcp://localhost:8100/MyService" />
               <add baseAddress="net.pipe://localhost/" />

You'll also need to specify at least one net.pipe endpoint in your server's config in order to use this protocol.

As other have also commented, WCF allow net.pipe binding only for local machine calls, e.g. you cannot call from one physical machine to another. If you need that capability, use the net.tcp binding instead.

Marc

marc_s