“The command is not available”

So, first of all, I want to say sorry for the slow release of this latest update.  It is really tough to get one out, when you are on a beach in Eastern Thailand soaking up sun and watching a group of “red shirted thugs” get their asses kicked off the streets. Needless to say, the trip has been great – and I love the excitement!

Now, let’s say that you are on vacation as I am, and you decide to put on your out of office assistant. You’d think that the damn thing should just work, right? Well, you’d be wrong. I don’t know why this little extension in Micrososft Office Outlook, can be such a truly royal pain in the buttocks, but without fail, I find myself constantly diagnosing issues with it and having to everything from registry edits to outright reinstalling it to get it working.  It really shouldn’t be this much of a pain.

Anyway, one error that I have come across numerous times is the

"The command is not available. See the program documentation about how to use this extension."”  error.  This little guy is just bizarre. For whatever, reason, Outlook just decides that this chunk of code is unsafe and disables it.



Ok, fair enough. Just go into the tools menu and fix …umm, wait…, I can’t find anything about disabled add-ins in the tools menu….maybe its under options…umm…nope…well, hmm…let’s keep going…geez, it can’t possibly be that hard to find this setting…and ..hmm…with only 2,999 more menu items to go through…….JESUS CHRIST, where in the hell is it? F$%K!

Well, I won’t hold you in suspense any longer…this menu entry is right where you would expect important settings like this to be located…right in the most logical of spots…simply browse to the “HELP” menu, then “ABOUT MICROSOFT OFFICE OUTLOOK”  and then click on the “DISABLED ITEMS”

There is a good chance that thee is only one item that is in the list and re-enabling that will fix your “Out of Office Assistant” . Now, all I want to know is why in God’s damnation would Microsoft put that bloody setting under the HELP and ABOUT menu…WHY????????????? PLEEEEEEASE SOMEBODY TELL ME WHY>>>>> AHHHHHHGH!

Anyway, that’s my rant for today, and I hope that you can get your "Out of Office” message on for your own vacation after reading this.  I am heading back to the beach!



WCF: Using WCF With .NET 2.0

Well, I’m in beautiful sunny downtown Rayong, Thailand, and WCF is not high on my agenda right now, so this update is going to be a quick and simple, right-down-to-business tutorial on something a lot of you have been asking for: combining WCF and .NET 2.0.

WCF really is nice to use.  The problem, however, is that .NET 3.5 is truly a beast to deploy.  In many cases, requiring .NET 3.5 on a client’s machine is simply not on.  Luckily, WCF is a server technology, and you don’t actually need .NET 3.5 on the client machine to access it.  I’m going to show you how.

Let’s start with the WCF client.  Create a new WCF Service Application (found under the Web category), targeting .NET 3.5.  I’ll call mine WCFService.

In previous articles, I’ve written about a lot of the work involved with getting a WCF service built and running under IIS.  The nice thing about this VS template is that most of that is already done for you.  As soon as the project is created, run it.  Here’s what you’ll get:


As you can see, you’re browsing the service application you wrote.  This isn’t actually IIS, it’s a stripped down web server that ships with VS2008 called ASP.NET Development Server.  Don’t worry, though: it’s almost entirely compatible with the real IIS.  Except for a couple issues I’ve discussed previously regarding security and configuration settings, you won’t have any trouble making the transition.

So, our web service is running at http://localhost:49180.  You’ll see a file in the listing you get called Service1.svc.  This is the default WCF service VS added to your new project.  Click it, and you’ll browse to http://localhost:49180/Service1.svc, which will give you a page telling you that you’ve found a WCF service.  It also includes a link the the WSDL, which is what’s needed to consume this WCF service from non-WCF platforms, such as .NET 2.0.  Note that the port number may be different on your machine; be sure to use the address Visual Studio provides, not the example address I’m using through this tutorial.

There is just one more change you must make to your WCF Service to allow older clients to use it: you must use the basicHttpBinding rather than the default wsHttpBinding.  Open web.config and find the following line (likely line 154 or so):

<endpoint address="" binding="wsHttpBinding" contract="WCFService.IService1">

Change it to:

<endpoint address="" binding="basicHttpBinding" contract="WCFService.IService1">

Your service is now finished.

Now, on to the client.  I’ll use Visual Studio 2005 for this, even though you could just as easily use VS2008 and target .NET 2.0.  Create a new Windows Forms Application.  I’ll call mine WinFormsClient:

Once your project is created, you’ll need to add a reference to the WCF service you just built.  Click the Project menu and select Add Web Reference.  You’ll get a window asking you for an address.  Type the URL to your WCF Service (for now, it should be http://localhost:49180/Service1.svc, although the port number may be different) and click Go.  Visual Studio will find your WCF Service, although it will refer to it as a Web Reference:


I would suggest giving your reference a more meaningful name, such as WCFService.  Once you click Add Reference, VS will automatically set up everything needed to call the WCF Service.  Now, let’s write some code.  Double-click your new empty Form1, and VS will open up the Form Load method.  Type this:

Dim wcfService As New WCFService.Service1()
Me.Text = wcfService.GetData(Now.Second, True)

Your WCF Service should still be running, so now you just need to run your client.  When you do, the title bar should display the text returned by the call to your WCF Service:


Just like that, you’ve consumed a WCF service from .NET 2.0!  Obviously, there are a lot of places to go from here.  Debugging code is very nice; you’ll be able to jump from breakpoint to breakpoint right across the WCF boundary.  In real life, you’d want to adjust the URL used to access your web service.  But to just get up and running, that’s about it!

Hope this helps.  Time for me to head back to the beach.  Good luck!

Copyright © 2010 Paul Guenette and Matthew Sleno.