views:

1677

answers:

1

I am trying to host a WCF service with netNamedPipeBinding in a web applicaion on a Vista machine.

I enabled the non-HTTP service activation as described in this article: http://msdn.microsoft.com/en-us/library/ms731053.aspx

I configured the service as follows:

<endpoint address="net.pipe://myservice"
binding="netNamedPipeBinding"
bindingConfiguration="MyService_NamedPipeBindingConfig"
contract="ICMyService" />

<netNamedPipeBinding>
 <binding name="MyService_NamedPipeBindingConfig"
   maxBufferSize="2147483647"
   maxReceivedMessageSize="2147483647">
  <security mode="None">
   <transport protectionLevel="None" />
  </security>
 </binding>
</netNamedPipeBinding>

When I browse to the .svc file (on IIS, not the Visual studio webserver) I get this message:

[InvalidOperationException: The protocol 'net.pipe' is not supported.]
   System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetConfiguration(String scheme) +11461251
   System.ServiceModel.Channels.TransportChannelListener.OnOpening() +84
   System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +229
   System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) +72

[InvalidOperationException: The ChannelDispatcher at 'net.pipe://myservice' with contract(s) '"IMyService"' is unable to open its IChannelListener.]
   System.ServiceModel.Dispatcher.ChannelDispatcher.OnOpen(TimeSpan timeout) +118
   System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +261
   System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout) +107
   System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) +261
   System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +121
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +479

[ServiceActivationException: The service '/myservicehost/myservice.svc' cannot be activated due to an exception during compilation.  The exception message is: The ChannelDispatcher at 'net.pipe://myservice' with contract(s) '"IMyService"' is unable to open its IChannelListener..]
   System.ServiceModel.AsyncResult.End(IAsyncResult result) +11536522
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +176
   System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +278
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

I was hoping for a quicker and easier deployment using WAS, but this exception is not helping. Does any body know if I am doing somehting wrong?

+3  A: 

Did you follow that article exactly, or did you replace instances of 'net.tcp' in the command lines with 'net.pipe'? It may just be that you did not enable the net.pipe binding for that web site and your virtual directory.

jrista
Hi, I ignored the net.tcp stuff because I thought that was not relevant for net.pipe. But apparantly I need to enable net.pipe binding for my web site. I'm on it now.
veertien
Yep, that did the trick! It works now, thanks!
veertien
Strangely enough the "how to configure WAS" article does not menion to set up a net.pipe binding. But is explained in this example article: http://msdn.microsoft.com/en-us/library/ms752253.aspx
veertien
Glad it worked! :)
jrista