Monthly Archives: November 2014

Talk: Failing in the Cloud – A How To Guide – Boston Code Camp 22

Earlier today I had the privilege of speaking at the 22nd Boston Code Camp. My talk was Failing in the Cloud: A How To Guide. Thanks to those who attended (and persevered through the A/V system from hell!).

I’m on twitter at @codingoutloud. My book is at http://bit.ly/billbook.

The slide deck is here:

Add-AzureAccount – The Data is Invalid

I am a heavy user of PowerShell and recently I ran across an annoying problem that I didn’t find anywhere mentioned in the google. I was running the Add-AzureAccount cmdlet from the Azure PowerShell module. (Want it too? Start here. Or simply install it from the mighty Web Platform Installer.)
The Add-AzureAccount command usually pops up a login dialog so I can authenticate against my Azure account. But the behavior I was seeing never made it to that pop-up dialog – rather it quickly dumped out the following error at the command line:
Add-AzureAccount : The data is invalid.
At line:1 char:1
+ Add-AzureAccount + ~~~~~~~~~~~~~~~~   + CategoryInfo : CloseError: (:) [Add-AzureAccount], AadAuthenticationFailedException    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.AddAzureAccount
As mentioned above, I could not find useful references to Add-AzureAccount “data is invalid” via search engine, so I tried a few things. I first updated to the latest module. Didn’t help me – but you can check which version you have installed as follows:
PS>    (Get-Module Azure).Version

Major  Minor  Build  Revision
-----  -----  -----  --------
0      8      11     -1
Then I tried both the -Debug and -Verbose command line options, which are often useful. But no difference in the output. So this was failing pretty early!
Since this might be related to some cached credentials, I tried deleting TokenCache.dat in case there was something funky there. Nope. Here is command to view – and then delete – TokenCache.dat:
gci "$env:APPDATA\Windows Azure Powershell\TokenCache.dat"
ri "$env:APPDATA\Windows Azure Powershell\TokenCache.dat"
Finally, a kind sole suggested I simply try hosing out cookies from IE. That worked! Since I was in a PowerShell kind of mood, here’s how I emptied the cookie jar:
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
(I learned of this technique on many web sites by searching for ‘clear IE browser cache command line’.)
My problem was solved, and I am back to productively using Add-AzureAccount.
Hope this helps someone!

Talk: Guest Lecture Harvard Cloud Computing Class

Last night I was pleased to speak at Zoran B. Djordjević‘s Cloud Computing class at Harvard Extension (my 4th year). After dazzling the class with my prowess at plugging in my laptop to the projector, we jumped into the public cloud, with lots of Azure specifics – and how designing applications for the public cloud is different than what they might be used to (whether Azure, Amazon, or Google) – along with really good questions and discussion…

If you are interested in such things, I’m on twitter (@codingoutloud), have been running the Boston Azure cloud user group for five years, and wrote a book on Cloud Architecture Patterns.

SLIDE DECK: 2014-11-14 – Microsoft Azure Cloud Platform Overview — Zoran Djordjevic-Harvard-CSCI E-90 — 14-Nov-2014 — Bill Wilder (blog.codingoutloud.com)