August 2009 - Posts

(Note: this works on Vista 64-bit just as well)

I have studied a big old fat book on WCF for a long time now and yesterday I ran into a problem that was about the MSDTC and WS-AT (Atomic Transactions). More specifically I wanted to enable WS-AT on my laptop.

WS-AT is a standard for supporting transactional behaviour in distributed systems that cannot rely on MSDTC because of interoperability issues.

The book pointed me to this page. To be able to run WS-AT you have to be able to configure it. Microsoft has included a command-line tool called WsatConfig but since I have a tendency to like UI better I tried to configure that.

Luckily there is an option to extend the current MMC-snapin for MSDTC with another tab about WS-AT. This is really the first time I have come across this. Adding UI content to an existing Windows feature, using the command line. The article states that you have to register the codebase using regasm.exe using the following command line from VS Command Prompt: regasm.exe /codebase %PROGRAMFILES%\Microsoft SDKs\Windows\v6.0\Bin\WsatUI.dll.

Guess what, that did not work. There are still only three tabs and to add to my troubles there was no error when running regasm.

Can you guess what when wrong? Well it is the old 32/64-bit problem which I have come to know and love since I installed Windows 7. When you run VS Command Prompt, you are launching the 32-bit version and so you are executing the 32-bit version of regasm. To resolve this you have to start the 64-bit version of regasm.exe and also point to the 64-bit version of the WsatUI.dll file. So the correct thing to do is this:

  1. Open a regular command window.
  2. Navigate to %PROGRAMFILES%\Microsoft SDKs\Windows\v6.0\Bin\x64.
  3. Execute this line "%WINDOWS%\Microsoft.NET\Framework64\v2.0.50727\regasm.exe" /codebase WsatUI.dll
  4. Open the MMC for MSDTC by clicking the start button and do a search for dcomcnfg.exe.
  5. Navigate to My Computer\Distributed Transaction Coordinator\Local DTC, right-click and choose properties.


Hey look! I got a new tab called WS-AT. Click it to get the following view.


Now you can start configuring you WS-AT support. Just follow the instruction on this page.

My thanks to the Microsoft Forums user PeterMAnderson that answered his own post and provided the solution to the problem.

Why, little old me have now had the pleasure of getting “hit” over 1000 times! That is 1000 more than I hoped for. I really hope that I have helped at least someone out there.

A quick perusal of the hit distribution shows that if I want to keep up I should write more about Windows 7, so I will.

Ok, so I have to admit I am “one of those”. I hardly ever incorporate testing, however I strongly advocate it (don’t do as I do, do as I say). That is about to change, because I finally found a webcast that spoke to me in a way that I understand. Actually there are two and they are located here. Scroll down and you will find two webcast by Mike Stephenson, called ALM Part 1 and 2. These are informative and really gives you reasons as to why you should test told in a way that does not only convince me but he people who float the bill as well.

BizTalk is now finally "testable” in a way that can be implemented in a good way. So now I am reformed and will adhere to the gospel of testing, hallelujah.

Thanks Mike.

His blog is really good and you should give it a read.

First about the anti-virus thing. This is mostly meant for those who work at the same company as I do (i.e. Logica) and have had the audacity to install Windows 7. There is a way to get the old, familiar, feeling and join a CTP at F-secure, thus gaining access to the program and a subscription. The program seems to work just fine and looks really nice as well.

The other thing, I discovered today that there is a feature missing from VS 2008 when compared to 2005; the “Generate New GUID” option from the Tools-menu. Well here is how you get it back:

Open the Tools-menu and choose External Tools..

Click for better view

Configure it by clicking the Add-button and give it a title of your choice.

Click the button next to the Command-textbox and navigate to %Program Files%\Microsoft SDKs\Windows\v6.0A\Bin\x64\Uuidgen.exe (or %Program Files%\Microsoft SDKs\Windows\v6.0A\Bin\Uuidgen.exe for those of you stuck at 32-bits).

Tick the box to “Use Output Window” and then click OK.

Done! You now have the option directly on the tools menu:

Click for better view

If you use it, VS will generate a new GUID and display it in the Output Window:

Click for better view

To quote one of the great philosophers of our time: “Wohoo!”.

Just one short thing today that I found during a study break. There are three boxing match-style movies about WCF vs … well they don’t say but I think it has something to do with coffee. Watch them at If you can watch all three, you are either a bit bored or … I don’t know, but you are nerdy as hell.

I watched them, of course.

Firstly: Stop asking me for activation keys (codes)! There is no way I will give you any.

When installing Windows 7 I had just one problem and that was down to my own shortcomings. When I tried to activate Windows it gave me a strange error saying “Error Code 0xC004F074”:


The "More Information"-link does not provide much info. The thing is that when you install Windows 7 Enterprise you never really enter and product key and therefore Windows cannot be activated, since the key is moot.

Enter the new keyWhat you have to do is change the product key by clicking the correct link in the activation window. The activation window is found in the Control Panel. Instructions on how to change the product key can be found here. It features instructions on how to do it via UI and command line.

Now enter your proper key and click next and you are done my friend.

Date and Time Zone Settings
Commenter jmbosse89 pointed out that you will also get this error "if your Date and maybe Time Zone/Regional Settings are not matching". This seems to be the most common solution, judging by the comments.
Simply make sure that your system time and time zone are correct.

One of the many things I like about WCF is that it’s error messages are usually correct and even helpful, giving you pointers, most of the time. Therefore I have come to a point of not really questioning them. With that in mind I got this error message yesterday when doing a lab from my WCF book: The HTTP request is unauthorized with client authentication scheme 'Digest'. The authentication header received from the server was 'Digest qop="auth", realm="MapPoint”.

I was configuring a client to connect to the Bing Maps web services. Note that since this is a Microsoft Lab, everything was in plain text and I verified all the settings concerning security time after time.

<security mode="TransportCredentialOnly">
   <transport clientCredentialType="Digest" proxyCredentialType="None" realm="" />
   <message clientCredentialType="UserName" algorithmSuite="Default" />

So what do you think the problem was? Well turns out that I had the wrong username for the service. Not exactly clear as day is it? You get the same error if you use the wrong password as well. That was two hours I will never get back!

In other news: I got of Twitter that Windows7 RTM will be to MSDN at 7pm (19:00) CET today. Time to test that new 10 mBit internet wire subscription I have got at home. Maybe I can finally bid farewell to Vista…

Found this on Twitter today and I can only say: Hooray!

Not that I do not like IE nor did I dislike IE6 at the time. However there are a lot of companies out there that use IE6 still. These include an old client of mine (30 000+ employees world wide) and a “native” car manufacturer.

The site has some wonderful code samples, ready to just paste into your web apps.

I am amazed how easy it is to publish services to the cloud using Visual Studio. I am sure there will be some limitations concerning debugging and such but so far I find it really simple. What I did not find really simple was how to get the configuration settings, what to type and were to put them. So I thought I would do a post on it using my earlier adoption of the bare minimum.

In the walkthrough referred to in my earlier post, there is just a mention in point 10 about setting the values so that the service runs in the cloud. This is were I ran into trouble, so here goes.

Choose storage account

  • Choose Storage Account.

 Give the service a name and description.

  • Just type some name and description for the service. I choose BlobStorageSample. Click next.

 Type and check a storage account name

  • Now give the storage account a name. Be sure to choose something meaningful and “unsilly”. Logicamikesand is ok, strawberryman1968 is not.
  • Make sure the account name is available.
  • Affinity is not needed in order to make the sample work and can therefore be skipped.
  • Click Create to create the account an receive the settings.


  • I cannot give you my access keys, hope you understand that.
  • No go back to Visual Studio and open the BlobStorageSample solution.
  • Under the BlobStorageSample project open the ServiceConfiguration.csfg file.
  • Edit the following xml
  • <!-- Only used when running from the cloud -->
    <Setting name="AccountName" value="logicamikesand"/>
    <Setting name="AccountSharedKey" value="NOTTHEREALKEYUf6eTqITo2hrP4TQodG1aMYuZurjVDswgnX9wYFOGAIWWmoU/sfiXe0Q4wrd3/l88yDAXhQDg=="/>
    <Setting name="BlobStorageEndpoint" value=""/>

  • Account name is the name you gave the storage account (the unsilly one remember).
  • Use the primary access key for the “AccountSharedKey”-setting.
  • The last setting is of course the end point for the blob storage defined in the last step.

Done! All you have to do now is to make sure the BlobStorage Sample is the StartUp project and hit F5 to start running the service in the cloud. Simple is it not?

This is in my view one of the cooler features of Azure. The simplicity in it’s deployment. Coming from BizTalk I know how difficult deployment can be and if I turn the clock back even further I remember the troubles I had with just deploying COM-components to a single web server, with heavy use of command-line and regsvr32. So this could be much harder.