DCSIMG
December 2009 - Posts - Stiller's Blog

Stiller's Blog

Software Challenges - Arise!

December 2009 - Posts

How Fanboys See Operating Systems

I usually don’t like blog posts which simply reference some other site, but this one is just too good. I can definitely sympathize with that one.

Thanks to Elad Hanania who pointed me at the direction.

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”.

Service List

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.

Application Log

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 <listenerAdapters> 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.

 Feature Selection

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.

WF 4.0: Déjà-Vu? Not So Far!

I’ve worked a lot with WF 3.0 and WF 3.5 in the past, and I almost always ended up with some mixed feelings. On the one hand, WF is an amazing technology which allows you to do some pretty incredible things when you think about it – easily create a Domain-Specific Language (DSL) and allow domain experts to accurately model the business logic as they see fit in a graphic manner, just dragging-and-dropping some cubes around. Along with accompanying abilities to host the WF and allow it to communicate with the outer world it should be a definite winner.

On the other hand, when you start implementing your way around WF 3.5 – that’s exactly when all those annoying little problems start to come to life:

  1. Want to have a large WF with lots of activities? Better prepare for some sluggish WF designer experience.
  2. Want to flow a transaction into your WF? You can’t.
  3. Want to send a One-Way message over a One-Way WCF contract? That’s strange.
  4. Want to send a message and receive a reply? Prepare for some weird results.
  5. You get the point…

Examples are easily available, and it was of no surprise to me when I learned that Microsoft are preparing to rewrite the WF engine for .NET 4.0. The promises were loud, and the motivation was clear. However, as I attended this year’s PDC session on WF 4.0, I had this weird feeling of Déjà-Vu. Is history repeating itself? Are we getting the exact same product again? Have the issues been truly fixed? I had this uncomfortable feeling for a couple of weeks, until I finally had a chance to really dive deep into WF 4.0 – and the feeling just went away!

WF 4.0 brings many improvements over WF 3.0/3.5 (including deep WCF integration, enhanced performance and many more), however as far as I am concerned, the main improvement in WF 4.0 is the general feeling when using it – it is just easier and more streamlined to use with a lot less quirks and annoying behaviors. When combined with the hosting and management capabilities of Windows Server AppFabric Beta 1, this is definitely a winning technology.

How do I start with WF 4.0?

In the near future I plan to blog about some of my experiences with WF 4.0, WF services and AppFabric. Till than, I concentrated a list of resources I found useful for getting started with WF 4.0:

Anxious to know more?

Want to learn more on WF 4.0? Wish to see an AppFabric hosting demo live? Find out for yourself how easy it can be! Join Sasha’s and mine session on “Building Workflow Services with WF 4.0 and WCF 4.0” at the Sela Developer Practice (SDP).

image

Besides this session, Sela’s team of experts will bring you the latest and most up to date information on various Microsoft technologies, directly from the PDC which was held just a couple of weeks ago. What are you waiting for? Check out the various presentations and tutorials and sign up!