WAS Listener Adapter Hang
This post was written after I wasted invested several hours in getting a non-HTTP WCF 4.0 workflow service hosted in the Windows Process Activation Service (WAS), in hope that the next person who stumbles upon this would find it in Google Bing or something…
Assume you want to host a WCF 4.0 service in WAS on a Windows 7 environment. Lets further assume that this WCF service is non-HTTP activated, meaning that it uses TCP, MSMQ or named pipe bindings. One of the steps required for accomplishing the above is starting an appropriate listener adapter service for the binding we want the use. So for an MSMQ binding we need to start the “Net.Msmq Listener Adapter Service”.
If we assume that you already have IIS and MSMQ properly installed on your machine, starting the service might hang and the following message might appear in your Windows application log:
Listener Adapter protocol ‘msmq.formatname’ is waiting to connect to Windows Process Activation Service. This event will only be logged once. Cause: This could be caused by either Windows Process Activation Service not being started, the protocol not being configured in <listenerAdapters> section, or another process already connected as Listener Adapter for that protocol. Fix: Ensure that Windows Process Activation Service is running, the protocol is configured in the <listenerAdapters> section, and that another process has not already connected as the Listener Adapter for that protocol.
After checking that the WAS service is running and assuming that no other process has connected as a Listener Adapter for MSMQ, you reach the conclusion that MSMQ (or any other non-HTTP protocol for that matter) doesn’t appear in the section of applicationHost.config. At this point you might try searching how to configure this section, leading you to this .NET 3.5 sample page which explains pretty much what you want to do (even though you’re interested in .NET 4.0), but it doesn’t refer to the <listenerAdapters> section at all. You’ll also find these pages but they don’t help much either.
The solution, and even though you’re using .NET 4.0 over the latest Windows 7 you should not skip this important step – Go to “Control Panel –> Turn Windows features on or off” and there under “Microsoft .NET Framework 3.5.1” (yes, yes, even though you want .NET 4.0) select “Windows Communication Foundation Non-HTTP Activation”. That’s it.
I think the naming and organization of features could have been a little better…
As an extra – if you install Windows Server AppFabric it does this for you.