Windows Azure PowerShell: The remote server returned an unexpected response: (400) Bad Request

A few days ago, I was using Windows Azure PowserShell cmdlets to create a new virtual machine, and I got an error that didn’t provide the exception details. I requested some help internally and could eventually have additional information on my exception. Here what I did. Il y a quelques jours, j’%u00e9tais en train d’utiliser les cmdlets PowerShell Windows Azure pour cr%u00e9er une nouvelle machine virtuelle, et j’ai eu une erreur qui ne donnait pas les d%u00e9tails de l’exception. J’ai demand%u00e9 de l’aide en interne et ai finalement pu obtenir le d%u00e9tail de l’exception. Voici ce que j’ai fait.
The script and the exception I had were the following: Le script et l’exception que j’avais %u00e9taient les suivants:

 

PS C:\> $advm1 = New-AzureVMConfig -Name $vmName -InstanceSize Small -ImageName $imgName |
>> Add-AzureProvisioningConfig -WindowsDomain -Password $adminPassword -Domain $myDomain `
>> -DomainPassword $domainPassword -DomainUserName $domainUser -JoinDomain $FQDomainName |
>> Set-AzureSubnet -SubnetNames $subNet
>>
PS C:\>
PS C:\> New-AzureVM -VNetName $myVNET -ServiceName $serviceName -VMs $advm1
New-AzureVM : The remote server returned an unexpected response: (400) Bad Request.
At line:1 char:1
+ New-AzureVM -VNetName $myVNET -ServiceName $serviceName -VMs $advm1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureVM], ProtocolException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.IaaS.PersistentVMs.NewAzureVMCommand

The help I got internally stated that $Error[0].Exception was my ProtocolException and I also had some sample C# code that showed how to get the response stream that contains the interesting exception message. On m’a indiqu%u00e9 en interne que ma ProtocolException se trouvait %u00eatre $Error[0].Exception et on m’a %u00e9galement fourni du code C# qui montrait comment obtenir le flux qui contenait le message int%u00e9ressant de l’exception.
So I did the following: Ainsi, j’ai proc%u00e9d%u00e9 comme suit:

 

PS C:\> $sr = new-object System.IO.StreamReader($Error[0].Exception.InnerException.Response.GetResponseStream())
PS C:\> $txt = $sr.ReadToEnd()
PS C:\> $txt
<Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Code>BadR
equest</Code><Message>The name is not a valid storage account name.</Message></Error>
PS C:\> $sr.Dispose()

So I could add the “MediaLocation“ to my “New-AzureVMConfig” to have my virtual machine created. J’ai pu ensuite ajouter le param%u00e8tre “MediaLocation” %u00e0 ma “New-AzureVMConfig” et ai ainsi pu cr%u00e9er ma machine virtuelle.

 

Benjamin

Blog Post by: Benjamin GUINEBERTIERE

AZR317 Service Bus with Clemens Vasters

AZR317 Service Bus with Clemens Vasters

Full title: “Achieving Enterprise Integration Patterns with Windows Azure Service Bus”. Or another way to put it: ”What will happen to BizTalk when it gets cloudy”.

Well I would say, after the session, that BizTalk had very little o do with this. If you are a BizTalk developer you probably saw how things you do every day can be done in the Service Bus. Basically Clemens showed some of the most common patterns and how they are implemented in the Service bus. For instance splitter/aggregator, content based routing and recipient list.

There were some news that he told us.

AMQP

This is a very small, binary and lightweight protocol for queues that will be supported in the next version of the Service Bus (coming End Of Year).

SharePoint and Workflows

The next version of Sharepoint will stand on top of WF that in turn will stand on top of queues in the Service Bus. WF will store it’s state using sessions in the queues. I also think that “will” can be replaced by “is possible to”.

A real product

For some of us who have been around to see MS try to launch integration products like Windows Server AppFabric (Dublin) for instance. I have to say that this time it feel like MS think this is a real product. They have some customers using it today and Clemens show a couple of them. So I get a feeling that this is for real. I did not get that from Windows Server AppFabric. (A good product though).

Side note: To all who have not yet read the integration bible: Patterns of Enterprise Application Architecture, Clemens recommends it too.

Why the Azure Service Bus?

In short, Microsoft sees a future where you have to be able to process large quantities of messages (small) and that the flow of these messages might vary over time. Not only during the month but also the flow might start small but increase heavily during a short time. Examples of this might be smart meter readers for household electricity that collet readings but also receives messages from the suppler.

In scenarios like this, it is much smarter to by capacity on demand; Cloud and the Service Bus makes these scenarios possible.

Another example might be something that Clemens built; a smart thermostat for AC-units. He has even written an article in the current issue of MSDN magazine about it.

Ok, so new stuff

Right now the maximum size of a message is 256 kb (including headers). There might be an increase to this size but it will “almost certainly guaranteed” not go over 1 mb.

In the end of year (might be December the 62nd) there will be a new release that will contain part of that which is called project Iguazo, which is basically a message distribution system in which you can build trees of subscriptions. Divisions and sub-divisions and further sub-divisions make up the branches that at the end of the branch is a device. This makes for a very easy distribution to individual devices but also entire countries of devices just by smart addressing.

Some tips at the end then

NHTTP is one of Clemens little side projects and it is basically the use of the headers in http to send data in a key-value fashion. The N stands for NoHyperText and to use it you can simply prefix your properties with a P- and the access them from your code by accessing the HTTP headers directly. More info here.

When you configure queues and topics, use an auditing queue that gets a copy of all messages sent to the bus.

Blog Post by: Mikael Sand

Interview Series: Four Questions With  Paolo Salvatori

Interview Series: Four Questions With Paolo Salvatori

Welcome to the 41st interview in this longer-than-expected running series of chats with thought leaders in the “connected technology” space. This month, I’m pleased to snag Paolo Salvatori who is Senior Program Manager on the Business Platform Division Customer Advisory Team (CAT) at Microsoft, an epic blogger, frequent conference speaker, and recognized expert in distributed […]
Blog Post by: Richard Seroter

BizTalk Server MVP status renewed for 2012 – 6th year in a row

First of all I’m very humbled, delighted, pleased (much more?) to receive the news yesterday that my MVP (Most Valuable Professional) status is been renewed for 2012. If you are following lot of blogs, then you might have seen this message in few places now. Basically Microsoft got 4 renewal cycles (January, April,  July, October) in a year to bring new MVP’s on board and renew the existing ones who contribute to the selected community continuously.

Over the years I have heard people asking me, do you need to write a certification, or complete a course, or even do you need to know people in the product team etc..  For those of you who are not aware of the program, MVP award is an industry award provided by Microsoft to the influential people in the community. Microsoft got a full team ( I’ll say a complete division) to work with the community, their main role is to identify influential people in the community across various technologies like BizTalk, SharePoint, C#, Azure etc. There are MVP leads in most of the countries (90 according to official page), I believe for smaller ones a single MVP lead look after few countries. My MVP lead is Claire Smyth who looks after UK and Ireland.

Being an MVP is something very special, first of all you get the industry recognition straight away. There are only 4000 MVP’s world wide across all Microsoft technologies, that’s a tiny number compared to the 100 million people who participate in technology communities (source: http://mvp.support.microsoft.com/gp/aboutmvp). If you want to look at the BizTalk MVP numbers, there are only 32 BizTalk Server MVP’s worldwide, may be out of 60k BizTalk developers ( I just made up 60k given there are 12,000 BizTalk customers)

Personally for me the biggest advantage is knowing the top BizTalk talents in the world one to one. It’s more than that, most of them are very close friends now.

How does it help BizTalk360?

I have mentioned in the past, the birth of BizTalk360 was primarily driven by a chat over coffee at MVP Global Summit in 2010 with bunch of BizTalk Server MVP’s. You can read about the story here.

Apart from that I got couple of solid stories where my MVP status helped us in BizTalk360

Technical Help: BizTalk360 comes in two flavours Enterprise and Standard edition (tied to BizTalk server enterprise and standard editions). How do we identify the edition of BizTalk server? One way to do it is look into the registry setting (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\BizTalk Server\3.0) in the machine where BizTalk server is installed. But reading a registry from a web application can get into all kind of permission issues, also we support remote environment management that means reading remote registry settings (Forget it!! :-)). We approached Microsoft internal product team members and we identified a way to resolve it from the BizTalk database. Unfortunately we won’t be able to reveal this in public post, sorry guys 🙂

Marketing Help: Couple of emails got us a promotional link in Microsoft BizTalk ISV site http://www.microsoft.com/biztalk/en/us/isv-hardware.aspx?SortField1=ISV&SortField2=All. This is incredible, I send an email to my internal contact MVP contact in Microsoft, asking how we can list BizTalk360 on the ISV website, a week later we were there, this is simply incredible.

Congratulations to all the MVP’s who got renewed for 2012, and the new one’s coming on board. Thoroughly enjoy your time during your award period, I’ll see you all in the next MVP summit 2013.

Nandri!

Saravana Kumar