<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Extemporaneous Mumblings</title>
    <link>http://dunnry.com/blog/</link>
    <description>... a blog by Ryan Dunn</description>
    <language>en-us</language>
    <copyright>Ryan Dunn</copyright>
    <lastBuildDate>Mon, 16 Apr 2012 18:54:48 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.9074.18820</generator>
    <managingEditor>ryan@dunnry.com</managingEditor>
    <webMaster>ryan@dunnry.com</webMaster>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=f49c917c-9efc-4753-a066-cf58a3f7db0a</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,f49c917c-9efc-4753-a066-cf58a3f7db0a.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,f49c917c-9efc-4753-a066-cf58a3f7db0a.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f49c917c-9efc-4753-a066-cf58a3f7db0a</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Assuming you know <a href="http://dunnry.com/blog/2012/02/19/ChoosingWhatToMonitorInWindowsAzure.aspx">what
to monitor</a> and you have <a href="http://dunnry.com/blog/2012/02/27/SettingUpDiagnosticsMonitoringInWindowsAzure.aspx">configured
your deployments</a> to start monitoring, now you need to actually get the data and
do something with it.
</p>
        <p>
First, let's briefly recap how the Diagnostics Manager (DM) stores data.  Once
it has been configured, the DM will start to buffer data to disk locally on the VM
using the temporal scratch disk*.  It will buffer it using the quota policy found
in configuration.  By default, this allocates 4GB of local disk space to hold
diagnostics data.  You can change the quota with a little more work if you need
to hold more, but most folks should be served just fine with the default.  Data
is buffered as FIFO (first in, first out) in order to age out the oldest data first.
</p>
        <h3>Scheduled versus OnDemand
</h3>
        <p>
Once the data is buffering locally on the VM, you need to somehow transfer the data
from the VM to your cloud storage account.  You can do this by either setting
a <strong>Scheduled</strong> or <strong>OnDemand</strong> transfer.  In practice,
I tend to recommend always using Scheduled transfers and ignoring the OnDemand option
(it ends up being a lot easier).  
</p>
        <p>
But, for completeness, here is an example of setting an OnDemand transfer:
</p>
        <pre class="csharpcode">
          <span class="kwrd">void</span> Main() { var account = <span class="kwrd">new</span> CloudStorageAccount( <span class="kwrd">new</span> StorageCredentialsAccountAndKey(<span class="str">"dunnry"</span>, <span class="str">"yourkey"</span>), <span class="kwrd">true</span> );
var mgr = <span class="kwrd">new</span> DeploymentDiagnosticManager(account, <span class="str">"6468a8b749a54c3..."</span>); <span class="kwrd">foreach</span> (<span class="kwrd">string</span> role <span class="kwrd">in</span> mgr.GetRoleNames())
{ var ridm = mgr.GetRoleInstanceDiagnosticManagersForRole(role); var options = <span class="kwrd">new</span> OnDemandTransferOptions()
{ From = DateTime.UtcNow - TimeSpan.FromMinutes(10), To = DateTime.UtcNow, NotificationQueueName
= <span class="str">"pollme"</span> }; var qc = account.CreateCloudQueueClient();
var q = qc.GetQueueReference(<span class="str">"pollme"</span>); q.CreateIfNotExist(); <span class="kwrd">foreach</span> (var
i <span class="kwrd">in</span> ridm) { <span class="rem">//cancel all pending transfers</span><span class="kwrd">foreach</span> (var
pt <span class="kwrd">in</span> i.GetActiveTransfers()) { i.CancelOnDemandTransfers(pt.Key);
} var key = i.BeginOnDemandTransfer(DataBufferName.Logs, options); <span class="rem">//poll
here... why bother...</span> } } }</pre>
        <style type="text/css">

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
It's not exactly straightforward, but essentially, you need to specify the time range
to transfer and optionally a queue to notify when completed.  You must ensure
that all outstanding OnDemand transfers are canceled and then you can begin the transfer
and ideally you should also cancel the transfer when it is completed.  In theory,
this gives you some flexibility on what you want transferred.
</p>
        <p>
As with most things in life, there are some gotchas to using this code.  Most
of the time, folks forget to cancel the transfer after it completes.  When that
happens, it prevents any updates to the affected data source.  This can impact
you when you try to set new performance counters and see an error about an OnDemand
transfer for instance.  As such, you end up writing a lot of code to detect and
cancel pending transfers first before doing anything else in the API.
</p>
        <p>
Using Scheduled transfers ends up being easier in the long run because you end up
getting the same amount of data, but without having the pain of remembering to cancel
pending transfers and all that.  Here is similar code (you should adapt for each
data source you need to transfer):
</p>
        <pre class="csharpcode">
          <span class="kwrd">void</span> Main() { var account = <span class="kwrd">new</span> CloudStorageAccount( <span class="kwrd">new</span> StorageCredentialsAccountAndKey(<span class="str">"dunnry"</span>, <span class="str">"yourkey"</span>), <span class="kwrd">true</span> );
var mgr = <span class="kwrd">new</span> DeploymentDiagnosticManager(account, <span class="str">"6468a8b749a54c3..."</span>); <span class="kwrd">foreach</span> (<span class="kwrd">string</span> role <span class="kwrd">in</span> mgr.GetRoleNames())
{ var ridm = mgr.GetRoleInstanceDiagnosticManagersForRole(role); <span class="kwrd">foreach</span> (var
idm <span class="kwrd">in</span> ridm) { var config = idm.GetCurrentConfiguration()</pre>
        <pre class="csharpcode">                ?? DiagnosticMonitor.GetDefaultInitialConfiguration();
            config.PerformanceCounters.ScheduledTransferPeriod = TimeSpan.FromMinutes(5);
            
            <span class="rem">//set
other scheduled intervals here...</span> idm.SetCurrentConfiguration(config); } }
}</pre>
        <style type="text/css">

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
This ends up being the technique we use for <a href="http://www.azureops.com">AzureOps.com</a>. 
When you setup your subscription with us, we detect the diagnostics connection string
and allow you to change your data source settings.  For Performance Counters,
we force the transfer to 5 minutes to today (a good compromise) and allow you to choose
the interval for other sources (i.e. Traces, Windows Event Logs).  When you use
a provider like AzureOps, it is usually best to stream the data in in relatively small
chunks as opposed to say transferring once an hour.  Firstly, we won't be able
to do anything with your data until we see it and you probably want to be notified
sooner than 1 time an hour.  Secondly, when you set long transfer period times,
there is a risk that you exceed the buffer quota and start to lose data that was never
transferred.  In practice, we have not observed any noticeable overhead by transferring
more often.  When in doubt, pick <strong>5 mins</strong>.
</p>
        <p>
Whew!  If you have made it this far, you now have a reasonable set of performance
counters and trace information that is both being collected on your VMs in Windows
Azure as well as being persisted to your storage account.  So, essentially, you
need to now figure out what to do with that data.  That will be the subject of
the next post in this series.
</p>
        <p>
 
</p>
        <p>
*if you are interested, RDP into an instance and check the resource drive (usually
C:) under /Resources/Directory/&lt;roleuniquename&gt;/Monitor to see buffered data.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=f49c917c-9efc-4753-a066-cf58a3f7db0a" />
      </body>
      <title>Getting Diagnostics Data From Windows Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,f49c917c-9efc-4753-a066-cf58a3f7db0a.aspx</guid>
      <link>http://dunnry.com/blog/2012/04/16/GettingDiagnosticsDataFromWindowsAzure.aspx</link>
      <pubDate>Mon, 16 Apr 2012 18:54:48 GMT</pubDate>
      <description>&lt;p&gt;
Assuming you know &lt;a href="http://dunnry.com/blog/2012/02/19/ChoosingWhatToMonitorInWindowsAzure.aspx"&gt;what
to monitor&lt;/a&gt; and you have &lt;a href="http://dunnry.com/blog/2012/02/27/SettingUpDiagnosticsMonitoringInWindowsAzure.aspx"&gt;configured
your deployments&lt;/a&gt; to start monitoring, now you need to actually get the data and
do something with it.
&lt;/p&gt;
&lt;p&gt;
First, let's briefly recap how the Diagnostics Manager (DM) stores data.&amp;#160; Once
it has been configured, the DM will start to buffer data to disk locally on the VM
using the temporal scratch disk*.&amp;#160; It will buffer it using the quota policy found
in configuration.&amp;#160; By default, this allocates 4GB of local disk space to hold
diagnostics data.&amp;#160; You can change the quota with a little more work if you need
to hold more, but most folks should be served just fine with the default.&amp;#160; Data
is buffered as FIFO (first in, first out) in order to age out the oldest data first.
&lt;/p&gt;
&lt;h3&gt;Scheduled versus OnDemand
&lt;/h3&gt;
&lt;p&gt;
Once the data is buffering locally on the VM, you need to somehow transfer the data
from the VM to your cloud storage account.&amp;#160; You can do this by either setting
a &lt;strong&gt;Scheduled&lt;/strong&gt; or &lt;strong&gt;OnDemand&lt;/strong&gt; transfer.&amp;#160; In practice,
I tend to recommend always using Scheduled transfers and ignoring the OnDemand option
(it ends up being a lot easier).&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
But, for completeness, here is an example of setting an OnDemand transfer:
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; Main() { var account = &lt;span class="kwrd"&gt;new&lt;/span&gt; CloudStorageAccount( &lt;span class="kwrd"&gt;new&lt;/span&gt; StorageCredentialsAccountAndKey(&lt;span class="str"&gt;&amp;quot;dunnry&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;yourkey&amp;quot;&lt;/span&gt;), &lt;span class="kwrd"&gt;true&lt;/span&gt; );
var mgr = &lt;span class="kwrd"&gt;new&lt;/span&gt; DeploymentDiagnosticManager(account, &lt;span class="str"&gt;&amp;quot;6468a8b749a54c3...&amp;quot;&lt;/span&gt;); &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt; role &lt;span class="kwrd"&gt;in&lt;/span&gt; mgr.GetRoleNames())
{ var ridm = mgr.GetRoleInstanceDiagnosticManagersForRole(role); var options = &lt;span class="kwrd"&gt;new&lt;/span&gt; OnDemandTransferOptions()
{ From = DateTime.UtcNow - TimeSpan.FromMinutes(10), To = DateTime.UtcNow, NotificationQueueName
= &lt;span class="str"&gt;&amp;quot;pollme&amp;quot;&lt;/span&gt; }; var qc = account.CreateCloudQueueClient();
var q = qc.GetQueueReference(&lt;span class="str"&gt;&amp;quot;pollme&amp;quot;&lt;/span&gt;); q.CreateIfNotExist(); &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var
i &lt;span class="kwrd"&gt;in&lt;/span&gt; ridm) { &lt;span class="rem"&gt;//cancel all pending transfers&lt;/span&gt; &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var
pt &lt;span class="kwrd"&gt;in&lt;/span&gt; i.GetActiveTransfers()) { i.CancelOnDemandTransfers(pt.Key);
} var key = i.BeginOnDemandTransfer(DataBufferName.Logs, options); &lt;span class="rem"&gt;//poll
here... why bother...&lt;/span&gt; } } }&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
It's not exactly straightforward, but essentially, you need to specify the time range
to transfer and optionally a queue to notify when completed.&amp;#160; You must ensure
that all outstanding OnDemand transfers are canceled and then you can begin the transfer
and ideally you should also cancel the transfer when it is completed.&amp;#160; In theory,
this gives you some flexibility on what you want transferred.
&lt;/p&gt;
&lt;p&gt;
As with most things in life, there are some gotchas to using this code.&amp;#160; Most
of the time, folks forget to cancel the transfer after it completes.&amp;#160; When that
happens, it prevents any updates to the affected data source.&amp;#160; This can impact
you when you try to set new performance counters and see an error about an OnDemand
transfer for instance.&amp;#160; As such, you end up writing a lot of code to detect and
cancel pending transfers first before doing anything else in the API.
&lt;/p&gt;
&lt;p&gt;
Using Scheduled transfers ends up being easier in the long run because you end up
getting the same amount of data, but without having the pain of remembering to cancel
pending transfers and all that.&amp;#160; Here is similar code (you should adapt for each
data source you need to transfer):
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; Main() { var account = &lt;span class="kwrd"&gt;new&lt;/span&gt; CloudStorageAccount( &lt;span class="kwrd"&gt;new&lt;/span&gt; StorageCredentialsAccountAndKey(&lt;span class="str"&gt;&amp;quot;dunnry&amp;quot;&lt;/span&gt;, &lt;span class="str"&gt;&amp;quot;yourkey&amp;quot;&lt;/span&gt;), &lt;span class="kwrd"&gt;true&lt;/span&gt; );
var mgr = &lt;span class="kwrd"&gt;new&lt;/span&gt; DeploymentDiagnosticManager(account, &lt;span class="str"&gt;&amp;quot;6468a8b749a54c3...&amp;quot;&lt;/span&gt;); &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (&lt;span class="kwrd"&gt;string&lt;/span&gt; role &lt;span class="kwrd"&gt;in&lt;/span&gt; mgr.GetRoleNames())
{ var ridm = mgr.GetRoleInstanceDiagnosticManagersForRole(role); &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var
idm &lt;span class="kwrd"&gt;in&lt;/span&gt; ridm) { var config = idm.GetCurrentConfiguration()&lt;/pre&gt;
&lt;pre class="csharpcode"&gt;                ?? DiagnosticMonitor.GetDefaultInitialConfiguration();
            config.PerformanceCounters.ScheduledTransferPeriod = TimeSpan.FromMinutes(5);
            
            &lt;span class="rem"&gt;//set
other scheduled intervals here...&lt;/span&gt; idm.SetCurrentConfiguration(config); } }
}&lt;/pre&gt;
&lt;style type="text/css"&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
This ends up being the technique we use for &lt;a href="http://www.azureops.com"&gt;AzureOps.com&lt;/a&gt;.&amp;#160;
When you setup your subscription with us, we detect the diagnostics connection string
and allow you to change your data source settings.&amp;#160; For Performance Counters,
we force the transfer to 5 minutes to today (a good compromise) and allow you to choose
the interval for other sources (i.e. Traces, Windows Event Logs).&amp;#160; When you use
a provider like AzureOps, it is usually best to stream the data in in relatively small
chunks as opposed to say transferring once an hour.&amp;#160; Firstly, we won't be able
to do anything with your data until we see it and you probably want to be notified
sooner than 1 time an hour.&amp;#160; Secondly, when you set long transfer period times,
there is a risk that you exceed the buffer quota and start to lose data that was never
transferred.&amp;#160; In practice, we have not observed any noticeable overhead by transferring
more often.&amp;#160; When in doubt, pick &lt;strong&gt;5 mins&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
Whew!&amp;#160; If you have made it this far, you now have a reasonable set of performance
counters and trace information that is both being collected on your VMs in Windows
Azure as well as being persisted to your storage account.&amp;#160; So, essentially, you
need to now figure out what to do with that data.&amp;#160; That will be the subject of
the next post in this series.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
*if you are interested, RDP into an instance and check the resource drive (usually
C:) under /Resources/Directory/&amp;lt;roleuniquename&amp;gt;/Monitor to see buffered data.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=f49c917c-9efc-4753-a066-cf58a3f7db0a" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,f49c917c-9efc-4753-a066-cf58a3f7db0a.aspx</comments>
      <category>Azure</category>
      <category>AzureOps</category>
      <category>Diagnostics</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=396a9b6d-3150-42b4-b477-8e980cdb7e91</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,396a9b6d-3150-42b4-b477-8e980cdb7e91.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,396a9b6d-3150-42b4-b477-8e980cdb7e91.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=396a9b6d-3150-42b4-b477-8e980cdb7e91</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In order to actually monitor anything in Windows Azure, you need to use the Diagnostics
Manager (DM) that ships out of box.  SaaS providers like <a href="http://www.azureops.com/invitations">AzureOps</a> rely
on this data in order to tell you how your system is behaving.  The DM actually
supports a few data sources that it can collect and transfer:
</p>
        <ul>
          <li>
            <font color="#555555">Performance Counters</font>
          </li>
          <li>
            <font color="#555555">Trace logs</font>
          </li>
          <li>
            <font color="#555555">IIS Logs</font>
          </li>
          <li>
            <font color="#555555">Event Logs</font>
          </li>
          <li>
            <font color="#555555">Infrastructure Logs</font>
          </li>
          <li>
            <font color="#555555">Arbitrary logs</font>
          </li>
        </ul>
        <p>
One of the most common issues I hear from customers is that they don't know how to
get started using the DM or they think they are using it and just cannot find the
data where they think they should.  Hopefully, this post will clear up a bit
about how the DM actually works and how to configure it.  The next post will
talk about how to get the data once you are setup.
</p>
        <h3>Setting UP The Diagnostics Manager
</h3>
        <p>
Everything starts by checking a box.  When you check the little box in Visual
Studio that says "<em>Enable Diagnostics</em>", it actually modifies your Service
Definition to include a role plugin.  Role plugins are little things that can
add to your definition and configuration similar to a macro.  If you have ever
used Diagnostics or the RDP capability in Windows Azure, you have used a role plugin. 
For most of their history, these plugins have been exclusively built by Microsoft,
but there is really nothing stopping you from using it yourself (that is another topic).
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Setting-Up-The-Diagnostics-Monitor-In-Wi_F176/image_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Setting-Up-The-Diagnostics-Monitor-In-Wi_F176/image_thumb.png" width="495" height="137" />
          </a>
        </p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Setting-Up-The-Diagnostics-Monitor-In-Wi_F176/image_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Setting-Up-The-Diagnostics-Monitor-In-Wi_F176/image_thumb_1.png" width="303" height="84" />
          </a>
        </p>
        <p>
If we check our SDK folder in the plugins directory in the '<em>diagnostics</em>'
folder, you will actually find the magic that is used to launch the DM.
</p>
        <pre class="csharpcode">
          <span class="kwrd">&lt;?</span>
          <span class="html">xml</span>
          <span class="attr">version</span>
          <span class="kwrd">="1.0"</span> ?<span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">RoleModule</span><span class="attr">xmlns</span><span class="kwrd">="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"</span><span class="attr">namespace</span><span class="kwrd">="Microsoft.WindowsAzure.Plugins.Diagnostics"</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">Startup</span><span class="attr">priority</span><span class="kwrd">="-2"</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">Task</span><span class="attr">commandLine</span><span class="kwrd">="DiagnosticsAgent.exe"</span><span class="attr">executionContext</span><span class="kwrd">="limited"</span><span class="attr">taskType</span><span class="kwrd">="background"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;</span><span class="html">Task</span><span class="attr">commandLine</span><span class="kwrd">="DiagnosticsAgent.exe
/blockStartup"</span><span class="attr">executionContext</span><span class="kwrd">="limited"</span><span class="attr">taskType</span><span class="kwrd">="simple"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;/</span><span class="html">Startup</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">ConfigurationSettings</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;</span><span class="html">Setting</span><span class="attr">name</span><span class="kwrd">="ConnectionString"</span><span class="kwrd">/&gt;</span><span class="kwrd">&lt;/</span><span class="html">ConfigurationSettings</span><span class="kwrd">&gt;</span><span class="kwrd">&lt;/</span><span class="html">RoleModule</span><span class="kwrd">&gt;</span></pre>
        <style type="text/css">





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
        <p>
Here, we can see that the DM is implemented as a pair of <em>startup tasks</em>. 
Notice, it is using a task type of <em>background</em> (the other is blocking until
it gets going).  This means that the DM exists outside the code you write and
should be impervious to your code crashing and taking it down as well.  You can
also see that the startup tasks listed here will be run with a default priority of
-2.  This just tries to ensure that they run before any other startup tasks. 
The idea is that you want the DM to start before other stuff so it can collect data
for you.
</p>
        <p>
You can also see in the definition the declaration of a new <strong>ConfigurationSettings</strong> with
a single Setting called '<strong>ConnectionString'</strong>.  If you are using
Visual Studio when you import the Diagnostics plugin, you will see that the tooling
automatically combines the namespace with the settings name and creates a new Setting
called <strong>Microsoft.Windows.Plugins.Diagnostics.ConnectionString</strong>. 
This setting will not exist if you are building your <strong>csdef</strong> or <strong>cscfg</strong> files
by hand.  You must remember to include it.
</p>
        <p>
Once you have the plugin actually enabled in your solution, you will need to specify
a valid connection string in order for the DM to operate.  Here you have two
choices:
</p>
        <ol>
          <li>
            <font color="#555555">Running in emulation, it is valid to use "UseDevelopmentStorage=true"
as ConnectionString.</font>
          </li>
          <li>
            <font color="#555555">Before deploying to cloud, you must remember to update that
to a valid storage account (i.e. "DefaultEndpointsProtocol=https;AccountName=youraccount;AccountKey=nrIXB.")</font>
          </li>
        </ol>
        <h3>Common Pitfalls
</h3>
        <p>
It seems simple enough, but here come the first set of common <strong>pitfalls</strong> I
see:
</p>
        <ol>
          <li>
            <font color="#555555">Forgetting to set the ConnectionString to a valid storage account
and deploying with 'UseDevelopmentStorage=true'.  This has become less of a factor
in 1.6+ SDK tooling because you will notice the checkbox that says, "Use publish storage
account as connection string when you publish to Windows Azure".  However, tooling
will not help you here for automated deploys or when you forget to check that box.</font>
          </li>
          <li>
            <font color="#555555">Using "DefaultEndpointsProtocol=http" in the connection string
(note the missing 's' from 'https').  While it is technically possible to use
the DM with an http connection, it is not worth the hassle.  Just use https and
save yourself the hassle of troubleshooting this later.</font>
          </li>
          <li>
            <font color="#555555">Setting an invalid connection string.  Hard to believe,
but I see it all the time now on <a href="http://www.azureops.com/invitations">AzureOps</a>. 
This usually falls into two categories: deleting a storage account, and regenerating
a storage key.  If you delete a storage account, but forget to remove that as
the ConnectionString, things won't work (shocking, I know).  Further, if you
decide to regenerate the primary or secondary storage keys and you were using them,
stuff won't work here either.  Seems obvious, but you won't actually get any
warning on this.  Stuff won't work and you will have to figure that out yourself. 
A good 3rd party provider (like <a href="http://www.azureops.com/invitations">AzureOps</a>)
will let you know however.</font>
          </li>
          <li>
            <font color="#555555">Forgetting to co-locate the diagnostics storage account with
the hosted service.  This one might not show itself until you see the bill. 
The diagnostics agent can be pretty chatty.  I have seen GBs of data logged in
a single minute.  Forgetting to co-locate that would run you a pretty hefty bandwidth
bill in addition to slowing you down.</font>
          </li>
        </ol>
        <h3>Best Practices
</h3>
        <p>
Setting up the Diagnostics Manager is not terribly hard, but easy to get wrong if
you are not familiar with it.  There are some other subtle things you can do
here that will shoot yourself in the foot however.  Here are some things you
can do that will make your life easier:
</p>
        <ol>
          <li>
            <font color="#555555">Always separate your diagnostics storage account from other
storage accounts.  This is especially important for production systems. 
You do not want diagnostics competing with your primary storage account for resources. 
There is an account wide, 5000 transactions per second limit across tables, queues,
and blobs.  When you use a single storage account for both, you could unintentionally
throttle your production account.</font>
          </li>
          <li>
            <font color="#555555">If possible, use a different diagnostics storage account per
hosted service.  If that is not practical, at least try to separate storage accounts
for production versus non-production systems.  It turns out that querying diagnostics
data can be difficult if there are many different systems logging to the same diagnostics
tables.  What I have seen many times is someone use the same diagnostics account
for load testing against non-production systems as their production system. 
What happens is that the amount of data for the non-production system can greatly
exceed the production systems.  The query mechanism for then finding production
data is akin to finding a needle in the haystack.  It can take a very long time
in some cases to query even for simple things.</font>
          </li>
          <li>
            <font color="#555555">Don't' use the Anywhere location.  This applies to all
storage accounts and all hosted services.  This might seem obvious, but I see
it all the time.  It is possible to use Anywhere location with affinity groups
and avoid pitfall #4, but it is not worth the hassle.  Additionally, if you have
a 3rd party (like <a href="http://www.azureops.com/invitations">AzureOps</a>) that
is monitoring your data, we cannot geo-locate a worker next to you to pull your data. 
We won't know where you are located and it could mean big bandwidth bills for you.</font>
          </li>
        </ol>
        <p>
At this point, if you have enabled the DM, and remembered to set a valid connection
string, you are almost home.  The last thing to do is actually get the data and
avoid common pitfalls there.  That is the topic for the next post.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=396a9b6d-3150-42b4-b477-8e980cdb7e91" />
      </body>
      <title>Setting Up Diagnostics Monitoring In Windows Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,396a9b6d-3150-42b4-b477-8e980cdb7e91.aspx</guid>
      <link>http://dunnry.com/blog/2012/02/27/SettingUpDiagnosticsMonitoringInWindowsAzure.aspx</link>
      <pubDate>Mon, 27 Feb 2012 17:34:58 GMT</pubDate>
      <description>&lt;p&gt;
In order to actually monitor anything in Windows Azure, you need to use the Diagnostics
Manager (DM) that ships out of box.&amp;#160; SaaS providers like &lt;a href="http://www.azureops.com/invitations"&gt;AzureOps&lt;/a&gt; rely
on this data in order to tell you how your system is behaving.&amp;#160; The DM actually
supports a few data sources that it can collect and transfer:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Performance Counters&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Trace logs&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;IIS Logs&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Event Logs&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Infrastructure Logs&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Arbitrary logs&lt;/font&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
One of the most common issues I hear from customers is that they don't know how to
get started using the DM or they think they are using it and just cannot find the
data where they think they should.&amp;#160; Hopefully, this post will clear up a bit
about how the DM actually works and how to configure it.&amp;#160; The next post will
talk about how to get the data once you are setup.
&lt;/p&gt;
&lt;h3&gt;Setting UP The Diagnostics Manager
&lt;/h3&gt;
&lt;p&gt;
Everything starts by checking a box.&amp;#160; When you check the little box in Visual
Studio that says "&lt;em&gt;Enable Diagnostics&lt;/em&gt;", it actually modifies your Service
Definition to include a role plugin.&amp;#160; Role plugins are little things that can
add to your definition and configuration similar to a macro.&amp;#160; If you have ever
used Diagnostics or the RDP capability in Windows Azure, you have used a role plugin.&amp;#160;
For most of their history, these plugins have been exclusively built by Microsoft,
but there is really nothing stopping you from using it yourself (that is another topic).
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Setting-Up-The-Diagnostics-Monitor-In-Wi_F176/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Setting-Up-The-Diagnostics-Monitor-In-Wi_F176/image_thumb.png" width="495" height="137" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Setting-Up-The-Diagnostics-Monitor-In-Wi_F176/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Setting-Up-The-Diagnostics-Monitor-In-Wi_F176/image_thumb_1.png" width="303" height="84" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
If we check our SDK folder in the plugins directory in the '&lt;em&gt;diagnostics&lt;/em&gt;'
folder, you will actually find the magic that is used to launch the DM.
&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;?&lt;/span&gt;&lt;span class="html"&gt;xml&lt;/span&gt; &lt;span class="attr"&gt;version&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;1.0&amp;quot;&lt;/span&gt; ?&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;RoleModule&lt;/span&gt; &lt;span class="attr"&gt;xmlns&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;namespace&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;Microsoft.WindowsAzure.Plugins.Diagnostics&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Startup&lt;/span&gt; &lt;span class="attr"&gt;priority&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;-2&amp;quot;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Task&lt;/span&gt; &lt;span class="attr"&gt;commandLine&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;DiagnosticsAgent.exe&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;executionContext&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;limited&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;taskType&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;background&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Task&lt;/span&gt; &lt;span class="attr"&gt;commandLine&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;DiagnosticsAgent.exe
/blockStartup&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;executionContext&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;limited&amp;quot;&lt;/span&gt; &lt;span class="attr"&gt;taskType&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;simple&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;Startup&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;ConfigurationSettings&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;Setting&lt;/span&gt; &lt;span class="attr"&gt;name&lt;/span&gt;&lt;span class="kwrd"&gt;=&amp;quot;ConnectionString&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;ConfigurationSettings&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt; &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;RoleModule&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;style type="text/css"&gt;





.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;
&lt;p&gt;
Here, we can see that the DM is implemented as a pair of &lt;em&gt;startup tasks&lt;/em&gt;.&amp;#160;
Notice, it is using a task type of &lt;em&gt;background&lt;/em&gt; (the other is blocking until
it gets going).&amp;#160; This means that the DM exists outside the code you write and
should be impervious to your code crashing and taking it down as well.&amp;#160; You can
also see that the startup tasks listed here will be run with a default priority of
-2.&amp;#160; This just tries to ensure that they run before any other startup tasks.&amp;#160;
The idea is that you want the DM to start before other stuff so it can collect data
for you.
&lt;/p&gt;
&lt;p&gt;
You can also see in the definition the declaration of a new &lt;strong&gt;ConfigurationSettings&lt;/strong&gt; with
a single Setting called '&lt;strong&gt;ConnectionString'&lt;/strong&gt;.&amp;#160; If you are using
Visual Studio when you import the Diagnostics plugin, you will see that the tooling
automatically combines the namespace with the settings name and creates a new Setting
called &lt;strong&gt;Microsoft.Windows.Plugins.Diagnostics.ConnectionString&lt;/strong&gt;.&amp;#160;
This setting will not exist if you are building your &lt;strong&gt;csdef&lt;/strong&gt; or &lt;strong&gt;cscfg&lt;/strong&gt; files
by hand.&amp;#160; You must remember to include it.
&lt;/p&gt;
&lt;p&gt;
Once you have the plugin actually enabled in your solution, you will need to specify
a valid connection string in order for the DM to operate.&amp;#160; Here you have two
choices:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Running in emulation, it is valid to use "UseDevelopmentStorage=true"
as ConnectionString.&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Before deploying to cloud, you must remember to update that
to a valid storage account (i.e. "DefaultEndpointsProtocol=https;AccountName=youraccount;AccountKey=nrIXB.")&lt;/font&gt; 
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Common Pitfalls
&lt;/h3&gt;
&lt;p&gt;
It seems simple enough, but here come the first set of common &lt;strong&gt;pitfalls&lt;/strong&gt; I
see:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Forgetting to set the ConnectionString to a valid storage account
and deploying with 'UseDevelopmentStorage=true'.&amp;#160; This has become less of a factor
in 1.6+ SDK tooling because you will notice the checkbox that says, "Use publish storage
account as connection string when you publish to Windows Azure".&amp;#160; However, tooling
will not help you here for automated deploys or when you forget to check that box.&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Using "DefaultEndpointsProtocol=http" in the connection string
(note the missing 's' from 'https').&amp;#160; While it is technically possible to use
the DM with an http connection, it is not worth the hassle.&amp;#160; Just use https and
save yourself the hassle of troubleshooting this later.&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Setting an invalid connection string.&amp;#160; Hard to believe,
but I see it all the time now on &lt;a href="http://www.azureops.com/invitations"&gt;AzureOps&lt;/a&gt;.&amp;#160;
This usually falls into two categories: deleting a storage account, and regenerating
a storage key.&amp;#160; If you delete a storage account, but forget to remove that as
the ConnectionString, things won't work (shocking, I know).&amp;#160; Further, if you
decide to regenerate the primary or secondary storage keys and you were using them,
stuff won't work here either.&amp;#160; Seems obvious, but you won't actually get any
warning on this.&amp;#160; Stuff won't work and you will have to figure that out yourself.&amp;#160;
A good 3rd party provider (like &lt;a href="http://www.azureops.com/invitations"&gt;AzureOps&lt;/a&gt;)
will let you know however.&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Forgetting to co-locate the diagnostics storage account with
the hosted service.&amp;#160; This one might not show itself until you see the bill.&amp;#160;
The diagnostics agent can be pretty chatty.&amp;#160; I have seen GBs of data logged in
a single minute.&amp;#160; Forgetting to co-locate that would run you a pretty hefty bandwidth
bill in addition to slowing you down.&lt;/font&gt; 
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Best Practices
&lt;/h3&gt;
&lt;p&gt;
Setting up the Diagnostics Manager is not terribly hard, but easy to get wrong if
you are not familiar with it.&amp;#160; There are some other subtle things you can do
here that will shoot yourself in the foot however.&amp;#160; Here are some things you
can do that will make your life easier:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Always separate your diagnostics storage account from other
storage accounts.&amp;#160; This is especially important for production systems.&amp;#160;
You do not want diagnostics competing with your primary storage account for resources.&amp;#160;
There is an account wide, 5000 transactions per second limit across tables, queues,
and blobs.&amp;#160; When you use a single storage account for both, you could unintentionally
throttle your production account.&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;If possible, use a different diagnostics storage account per
hosted service.&amp;#160; If that is not practical, at least try to separate storage accounts
for production versus non-production systems.&amp;#160; It turns out that querying diagnostics
data can be difficult if there are many different systems logging to the same diagnostics
tables.&amp;#160; What I have seen many times is someone use the same diagnostics account
for load testing against non-production systems as their production system.&amp;#160;
What happens is that the amount of data for the non-production system can greatly
exceed the production systems.&amp;#160; The query mechanism for then finding production
data is akin to finding a needle in the haystack.&amp;#160; It can take a very long time
in some cases to query even for simple things.&lt;/font&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;font color="#555555"&gt;Don't' use the Anywhere location.&amp;#160; This applies to all
storage accounts and all hosted services.&amp;#160; This might seem obvious, but I see
it all the time.&amp;#160; It is possible to use Anywhere location with affinity groups
and avoid pitfall #4, but it is not worth the hassle.&amp;#160; Additionally, if you have
a 3rd party (like &lt;a href="http://www.azureops.com/invitations"&gt;AzureOps&lt;/a&gt;) that
is monitoring your data, we cannot geo-locate a worker next to you to pull your data.&amp;#160;
We won't know where you are located and it could mean big bandwidth bills for you.&lt;/font&gt; 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
At this point, if you have enabled the DM, and remembered to set a valid connection
string, you are almost home.&amp;#160; The last thing to do is actually get the data and
avoid common pitfalls there.&amp;#160; That is the topic for the next post.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=396a9b6d-3150-42b4-b477-8e980cdb7e91" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,396a9b6d-3150-42b4-b477-8e980cdb7e91.aspx</comments>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=cd6c9e95-949c-496f-8a08-0857f08db2d1</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,cd6c9e95-949c-496f-8a08-0857f08db2d1.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,cd6c9e95-949c-496f-8a08-0857f08db2d1.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=cd6c9e95-949c-496f-8a08-0857f08db2d1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of the first questions I often get when onboarding a customer is "What should
I be monitoring?".  There is no definitive list, but there are certainly some
things that tend to be more useful.  I recommend the following Performance Counters
in Windows Azure for all role types at bare minimum:
</p>
        <ul>
          <li>
\Processor(_Total)\% Processor Time 
</li>
          <li>
\Memory\Available Bytes 
</li>
          <li>
\Memory\Committed Bytes 
</li>
          <li>
\.NET CLR Memory(_Global_)\% Time in GC 
</li>
        </ul>
        <p>
          <font color="#666666">You would be surprised how much these 4 counters tell someone
without any other input.  You can see trends over time very clearly when monitoring
over weeks that will tell you what is a 'normal' range that your application should
be in.  If you start to see any of these counters spike (or spike down in the
case of Available Memory), this should be an indicator to you that something is going
on that you should care about.</font>
        </p>
        <h3>Web Roles
</h3>
        <p>
          <font color="#666666">For ASP.NET applications, there are some additional counters
that tend to be pretty useful:</font>
        </p>
        <ul>
          <li>
\ASP.NET Applications(__Total__)\Requests Total 
</li>
          <li>
\ASP.NET Applications(__Total__)\Requests/Sec 
</li>
          <li>
\ASP.NET Applications(__Total__)\Requests Not Authorized 
</li>
          <li>
\ASP.NET Applications(__Total__)\Requests Timed Out 
</li>
          <li>
\ASP.NET Applications(__Total__)\Requests Not Found 
</li>
          <li>
\ASP.NET Applications(__Total__)\Request Error Events Raised 
</li>
          <li>
\Network Interface(*)\Bytes Sent/sec 
</li>
        </ul>
        <p>
          <font color="#666666">If you are using something other than the latest version of
.NET, you might need to choose the version specific instances of these counters. 
By default, these are going to only work for .NET 4 ASP.NET apps.  If you are
using .NET 2 CLR apps (including .NET 3.5), you will want to choose the version specific
counters.</font>
        </p>
        <p>
          <font color="#666666">The last counter you see in this list is somewhat special as
it includes a wildcard instance (*).  This is important to choose in Windows
Azure as the names of the actual instance adapter can (and tends to) change over time
and deployments.  Sometimes it is "Local Area Connection* 12", sometimes it is
"Microsoft Virtual Machine Bus Network Adapter".  The latter one tends to be
the one that you see most often with data, but just to be sure, I would include them
all.  Note, this is not an exhaustive list - if you have custom counters or additional
system counters that are meaningful, by all means, include them.  In <a href="http://www.azureops.com">AzureOps</a>,
we can set these remotely on your instances using the property page for your deployment.</font>
        </p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Choosing-What-To-Monitor-In-Windows-Azur_EC83/image_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Choosing-What-To-Monitor-In-Windows-Azur_EC83/image_thumb.png" width="504" height="447" />
          </a>
        </p>
        <h3>Choosing a Sample Rate
</h3>
        <p>
          <font color="#666666">You should not need to sample any counter faster than 30 seconds. 
Period.  In fact, in 99% of all cases, I would actually recommend 120 seconds
(that is our default we recommend in <a href="http://www.azureops.com">AzureOps</a>). 
This might seem like you are losing too much data or that you are going to miss something. 
However, experience has shown that this sample rate is more than sufficient to monitor
the system over days, weeks, and months with enough resolution to know what is happening
in your application.  The difference between 30 seconds and 120 seconds is 4
times as much data.  When you sample at 1 and 5 second sample rates, you are
talking about 120x and 24x the amount of data.  That is per instance, by the
way.  If you are have more than 1 instance, now multiply that by number of instances. 
It will quickly approach absurd quantities of data that costs you money in transactions
and storage to store, and that has no additional value to parse, but a lot more pain
to keep.  Resist the urge to put 1, 5, or even 10 seconds - try 120 seconds to
start and tune down if you really need to.</font>
        </p>
        <h3>Tracing
</h3>
        <p>
          <font color="#666666">The other thing I recommend for our customers is to use tracing
in their application.  If you only use the built-in Trace.TraceInformation (and
similar), you are ahead of the game.  There is an <a href="http://msdn.microsoft.com/en-us/magazine/ff714589.aspx">excellent
article in MSDN</a> about how to setup more advanced tracing with TraceSources that
I recommend as well.</font>
        </p>
        <p>
          <font color="#666666">I recommend using tracing for a variety of reasons.  First,
it will definitely help you when your app is running in the cloud and you want to
gain insight into issues you see.  If you had logged exceptions to Trace or critical
code paths to Trace, then you now have potential insight into your system.  Additionally,
you can use this as a type of metric in the system to be mined later.  For instance,
you can log length of time a particular request or operation is taking.  Later,
you can pull those logs and analyze what was the bottleneck in your running application. 
Within <a href="http://www.azureops.com">AzureOps</a>, we can parse trace messages
in variety of ways (including semantically).  We use this functionality to alert
ourselves when something strange is happening (more on this in a later post).</font>
        </p>
        <p>
          <font color="#666666">The biggest obstacle I see with new customers is remembering
to turn on transfer for their trace messages.  Luckily, within <a href="http://www.azureops.com">AzureOps</a>,
this is again easy to do.  Simply set a Filter Level and a Transfer Interval
(I recommend 5 mins).</font>
        </p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Choosing-What-To-Monitor-In-Windows-Azur_EC83/image_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Choosing-What-To-Monitor-In-Windows-Azur_EC83/image_thumb_1.png" width="504" height="196" />
          </a>
        </p>
        <p>
The Filter Level will depend a bit on how you use the filtering in your own traces. 
I have seen folks that trace rarely, so lower filters are fine.  However, I have
also seen customers trace upwards of 500 traces/sec.  As a point of reference,
at that level of tracing, you are talking about <strong>2GB</strong> of data on the
wire <strong>each minute</strong> if you transfer at that verbosity.  Heavy tracers,
beware!  I usually recommend verbose for light tracers and Warning for tracers
that are instrumenting each method for instance.  You can always change this
setting later, so don't worry too much right now.
</p>
        <h3>Coming Up
</h3>
        <p>
In the next post, I will walk you through how to setup your diagnostics in Windows
Azure and point out some common pitfalls that I see.
</p>
        <p>
 
</p>
        <p>
          <font color="#666666"> </font>
        </p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=cd6c9e95-949c-496f-8a08-0857f08db2d1" />
      </body>
      <title>Choosing What To Monitor In Windows Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,cd6c9e95-949c-496f-8a08-0857f08db2d1.aspx</guid>
      <link>http://dunnry.com/blog/2012/02/19/ChoosingWhatToMonitorInWindowsAzure.aspx</link>
      <pubDate>Sun, 19 Feb 2012 22:39:39 GMT</pubDate>
      <description>&lt;p&gt;
One of the first questions I often get when onboarding a customer is "What should
I be monitoring?".&amp;#160; There is no definitive list, but there are certainly some
things that tend to be more useful.&amp;#160; I recommend the following Performance Counters
in Windows Azure for all role types at bare minimum:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
\Processor(_Total)\% Processor Time 
&lt;/li&gt;
&lt;li&gt;
\Memory\Available Bytes 
&lt;/li&gt;
&lt;li&gt;
\Memory\Committed Bytes 
&lt;/li&gt;
&lt;li&gt;
\.NET CLR Memory(_Global_)\% Time in GC 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;You would be surprised how much these 4 counters tell someone
without any other input.&amp;#160; You can see trends over time very clearly when monitoring
over weeks that will tell you what is a 'normal' range that your application should
be in.&amp;#160; If you start to see any of these counters spike (or spike down in the
case of Available Memory), this should be an indicator to you that something is going
on that you should care about.&lt;/font&gt;
&lt;/p&gt;
&lt;h3&gt;Web Roles
&lt;/h3&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;For ASP.NET applications, there are some additional counters
that tend to be pretty useful:&lt;/font&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
\ASP.NET Applications(__Total__)\Requests Total 
&lt;/li&gt;
&lt;li&gt;
\ASP.NET Applications(__Total__)\Requests/Sec 
&lt;/li&gt;
&lt;li&gt;
\ASP.NET Applications(__Total__)\Requests Not Authorized 
&lt;/li&gt;
&lt;li&gt;
\ASP.NET Applications(__Total__)\Requests Timed Out 
&lt;/li&gt;
&lt;li&gt;
\ASP.NET Applications(__Total__)\Requests Not Found 
&lt;/li&gt;
&lt;li&gt;
\ASP.NET Applications(__Total__)\Request Error Events Raised 
&lt;/li&gt;
&lt;li&gt;
\Network Interface(*)\Bytes Sent/sec 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;If you are using something other than the latest version of
.NET, you might need to choose the version specific instances of these counters.&amp;#160;
By default, these are going to only work for .NET 4 ASP.NET apps.&amp;#160; If you are
using .NET 2 CLR apps (including .NET 3.5), you will want to choose the version specific
counters.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;The last counter you see in this list is somewhat special as
it includes a wildcard instance (*).&amp;#160; This is important to choose in Windows
Azure as the names of the actual instance adapter can (and tends to) change over time
and deployments.&amp;#160; Sometimes it is "Local Area Connection* 12", sometimes it is
"Microsoft Virtual Machine Bus Network Adapter".&amp;#160; The latter one tends to be
the one that you see most often with data, but just to be sure, I would include them
all.&amp;#160; Note, this is not an exhaustive list - if you have custom counters or additional
system counters that are meaningful, by all means, include them.&amp;#160; In &lt;a href="http://www.azureops.com"&gt;AzureOps&lt;/a&gt;,
we can set these remotely on your instances using the property page for your deployment.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Choosing-What-To-Monitor-In-Windows-Azur_EC83/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Choosing-What-To-Monitor-In-Windows-Azur_EC83/image_thumb.png" width="504" height="447" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;Choosing a Sample Rate
&lt;/h3&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;You should not need to sample any counter faster than 30 seconds.&amp;#160;
Period.&amp;#160; In fact, in 99% of all cases, I would actually recommend 120 seconds
(that is our default we recommend in &lt;a href="http://www.azureops.com"&gt;AzureOps&lt;/a&gt;).&amp;#160;
This might seem like you are losing too much data or that you are going to miss something.&amp;#160;
However, experience has shown that this sample rate is more than sufficient to monitor
the system over days, weeks, and months with enough resolution to know what is happening
in your application.&amp;#160; The difference between 30 seconds and 120 seconds is 4
times as much data.&amp;#160; When you sample at 1 and 5 second sample rates, you are
talking about 120x and 24x the amount of data.&amp;#160; That is per instance, by the
way.&amp;#160; If you are have more than 1 instance, now multiply that by number of instances.&amp;#160;
It will quickly approach absurd quantities of data that costs you money in transactions
and storage to store, and that has no additional value to parse, but a lot more pain
to keep.&amp;#160; Resist the urge to put 1, 5, or even 10 seconds - try 120 seconds to
start and tune down if you really need to.&lt;/font&gt;
&lt;/p&gt;
&lt;h3&gt;Tracing
&lt;/h3&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;The other thing I recommend for our customers is to use tracing
in their application.&amp;#160; If you only use the built-in Trace.TraceInformation (and
similar), you are ahead of the game.&amp;#160; There is an &lt;a href="http://msdn.microsoft.com/en-us/magazine/ff714589.aspx"&gt;excellent
article in MSDN&lt;/a&gt; about how to setup more advanced tracing with TraceSources that
I recommend as well.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;I recommend using tracing for a variety of reasons.&amp;#160; First,
it will definitely help you when your app is running in the cloud and you want to
gain insight into issues you see.&amp;#160; If you had logged exceptions to Trace or critical
code paths to Trace, then you now have potential insight into your system.&amp;#160; Additionally,
you can use this as a type of metric in the system to be mined later.&amp;#160; For instance,
you can log length of time a particular request or operation is taking.&amp;#160; Later,
you can pull those logs and analyze what was the bottleneck in your running application.&amp;#160;
Within &lt;a href="http://www.azureops.com"&gt;AzureOps&lt;/a&gt;, we can parse trace messages
in variety of ways (including semantically).&amp;#160; We use this functionality to alert
ourselves when something strange is happening (more on this in a later post).&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;The biggest obstacle I see with new customers is remembering
to turn on transfer for their trace messages.&amp;#160; Luckily, within &lt;a href="http://www.azureops.com"&gt;AzureOps&lt;/a&gt;,
this is again easy to do.&amp;#160; Simply set a Filter Level and a Transfer Interval
(I recommend 5 mins).&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Choosing-What-To-Monitor-In-Windows-Azur_EC83/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Choosing-What-To-Monitor-In-Windows-Azur_EC83/image_thumb_1.png" width="504" height="196" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The Filter Level will depend a bit on how you use the filtering in your own traces.&amp;#160;
I have seen folks that trace rarely, so lower filters are fine.&amp;#160; However, I have
also seen customers trace upwards of 500 traces/sec.&amp;#160; As a point of reference,
at that level of tracing, you are talking about &lt;strong&gt;2GB&lt;/strong&gt; of data on the
wire &lt;strong&gt;each minute&lt;/strong&gt; if you transfer at that verbosity.&amp;#160; Heavy tracers,
beware!&amp;#160; I usually recommend verbose for light tracers and Warning for tracers
that are instrumenting each method for instance.&amp;#160; You can always change this
setting later, so don't worry too much right now.
&lt;/p&gt;
&lt;h3&gt;Coming Up
&lt;/h3&gt;
&lt;p&gt;
In the next post, I will walk you through how to setup your diagnostics in Windows
Azure and point out some common pitfalls that I see.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;&amp;#160;&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=cd6c9e95-949c-496f-8a08-0857f08db2d1" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,cd6c9e95-949c-496f-8a08-0857f08db2d1.aspx</comments>
      <category>Azure</category>
      <category>AzureOps</category>
      <category>Diagnostics</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=c7532c48-59c9-4d92-b318-057324d7fd82</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,c7532c48-59c9-4d92-b318-057324d7fd82.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,c7532c48-59c9-4d92-b318-057324d7fd82.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c7532c48-59c9-4d92-b318-057324d7fd82</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
For the last year since leaving Microsoft, I have been deeply involved in building
a world class SaaS monitoring service called <a href="http://www.azureops.com">AzureOps</a>. 
During this time, it was inevitable that I see not only how to best monitor services
running in Windows Azure, but also see the common pitfalls amongst our beta users. 
It is one thing to be a Technical Evangelist like I was and occasionally use a service
for a demo or two, and quite another to attempt to build a business on it.
</p>
        <p>
Monitoring a running service in Windows Azure can actually be daunting if you have
not worked with it before.  In this coming series, I will attempt to share the
knowledge we have gained building <a href="http://www.azureops.com">AzureOps</a> and
from our customers.  The series will be grounded in these 5 areas:
</p>
        <ol>
          <li>
            <a href="http://dunnry.com/blog/2012/02/19/ChoosingWhatToMonitorInWindowsAzure.aspx">Choosing
what to monitor in Windows Azure.</a>
          </li>
          <li>
            <div align="left">
              <a href="http://dunnry.com/blog/2012/02/27/SettingUpDiagnosticsMonitoringInWindowsAzure.aspx">Setting
up the Diagnostics Monitor in Windows Azure</a>
            </div>
          </li>
          <li>
            <a href="http://dunnry.com/blog/2012/04/16/GettingDiagnosticsDataFromWindowsAzure.aspx">Getting
the diagnostics data from Windows Azure</a>
          </li>
          <li>
Interpreting diagnostics data and making adjustments. 
</li>
          <li>
Maintaining your service in Windows Azure. 
</li>
        </ol>
        <p>
          <font color="#666666">Each one of these areas will be a post in the series and I will
update this post to keep a link to the latest.  I will use <a href="http://www.azureops.com">AzureOps</a> as
an example in some cases to highlight both what we learned as well as the approach
we take now due to this experience.</font>
        </p>
        <p>
          <font color="#666666">If you are interested in monitoring your own services in Windows
Azure, <a href="http://www.azureops.com/invitations">grab an invite</a> and get started
today!.</font>
        </p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=c7532c48-59c9-4d92-b318-057324d7fd82" />
      </body>
      <title>Monitoring in Windows Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,c7532c48-59c9-4d92-b318-057324d7fd82.aspx</guid>
      <link>http://dunnry.com/blog/2012/02/19/MonitoringInWindowsAzure.aspx</link>
      <pubDate>Sun, 19 Feb 2012 22:39:09 GMT</pubDate>
      <description>&lt;p&gt;
For the last year since leaving Microsoft, I have been deeply involved in building
a world class SaaS monitoring service called &lt;a href="http://www.azureops.com"&gt;AzureOps&lt;/a&gt;.&amp;#160;
During this time, it was inevitable that I see not only how to best monitor services
running in Windows Azure, but also see the common pitfalls amongst our beta users.&amp;#160;
It is one thing to be a Technical Evangelist like I was and occasionally use a service
for a demo or two, and quite another to attempt to build a business on it.
&lt;/p&gt;
&lt;p&gt;
Monitoring a running service in Windows Azure can actually be daunting if you have
not worked with it before.&amp;#160; In this coming series, I will attempt to share the
knowledge we have gained building &lt;a href="http://www.azureops.com"&gt;AzureOps&lt;/a&gt; and
from our customers.&amp;#160; The series will be grounded in these 5 areas:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;a href="http://dunnry.com/blog/2012/02/19/ChoosingWhatToMonitorInWindowsAzure.aspx"&gt;Choosing
what to monitor in Windows Azure.&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;div align="left"&gt;&lt;a href="http://dunnry.com/blog/2012/02/27/SettingUpDiagnosticsMonitoringInWindowsAzure.aspx"&gt;Setting
up the Diagnostics Monitor in Windows Azure&lt;/a&gt; 
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://dunnry.com/blog/2012/04/16/GettingDiagnosticsDataFromWindowsAzure.aspx"&gt;Getting
the diagnostics data from Windows Azure&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
Interpreting diagnostics data and making adjustments. 
&lt;/li&gt;
&lt;li&gt;
Maintaining your service in Windows Azure. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;Each one of these areas will be a post in the series and I will
update this post to keep a link to the latest.&amp;#160; I will use &lt;a href="http://www.azureops.com"&gt;AzureOps&lt;/a&gt; as
an example in some cases to highlight both what we learned as well as the approach
we take now due to this experience.&lt;/font&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;font color="#666666"&gt;If you are interested in monitoring your own services in Windows
Azure, &lt;a href="http://www.azureops.com/invitations"&gt;grab an invite&lt;/a&gt; and get started
today!.&lt;/font&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=c7532c48-59c9-4d92-b318-057324d7fd82" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,c7532c48-59c9-4d92-b318-057324d7fd82.aspx</comments>
      <category>Azure</category>
      <category>AzureOps</category>
      <category>Cloud Services</category>
      <category>Diagnostics</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=bac071c4-5ad5-46e3-a171-e0604b177532</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,bac071c4-5ad5-46e3-a171-e0604b177532.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,bac071c4-5ad5-46e3-a171-e0604b177532.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bac071c4-5ad5-46e3-a171-e0604b177532</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I spent the last few hours debugging an issue where a query in Windows Azure table
storage was not returning any results, even though I knew that data was there. 
It didn't start that way of course.  Rather, stuff that should have been working
and previously was working, just stopped working.  Tracing through the code and
debugging showed me it was a case of a method not returning data when it should have.
</p>
        <p>
Now, I have known for quite some time that you must handle continuation tokens and
you can never assume that a query will return data always (<a href="http://blog.smarx.com/posts/windows-azure-tables-expect-continuation-tokens-seriously" target="_blank">Steve
talks about it waaaay back when here</a>).  However, what I did not know was
that different methods of enumeration will give you different results.  Let me
explain by showing the code.
</p>
        <pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">var q = <span style="color: #0000ff">this</span>.CreateQuery() </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    .Where(filter)
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    .Where(f =&gt; f.PartitionKey.CompareTo(start.GetTicks()) &gt; 0)
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    .Take(1)
</pre>
          <pre style="background-color: #ffff00; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    .AsTableServiceQuery();
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">var first = q.FirstOrDefault();
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">if</span> (first
!= <span style="color: #0000ff">null</span>) </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">return</span>
            <span style="color: #0000ff">new</span> DateTime(<span style="color: #0000ff">long</span>.Parse(first.PartitionKey)); </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">}</pre>
        </pre>
        <p>
In this scenario, you would assume that you have continuation tokens nailed because
you have the magical <strong>AsTableServiceQuery</strong> extension method in use. 
It will magically chase the tokens until conclusion for you.  However, this code
does not work!  It will actually return <strong>null</strong> in cases where
you do not hit the partition server that holds your query results on the first try.
</p>
        <p>
I could easily reproduce the query in LINQPad:
</p>
        <pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">var q = ctx.CreateQuery&lt;Foo&gt;("<span style="color: #8b0000">WADPerformanceCountersTable</span>") </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    .Where(f =&gt; f.RowKey.CompareTo("<span style="color: #8b0000">9232a4ca79344adf9b1a942d37deb44a</span>")
&gt; 0 &amp;&amp; f.RowKey.CompareTo("<span style="color: #8b0000">9232a4ca79344adf9b1a942d37deb44a__|</span>")
&lt; 0) </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    .Where(f =&gt; f.PartitionKey.CompareTo(DateTime.Now.AddDays(-30).GetTicks()) &gt; 0)
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    .Take(1)
</pre>
          <pre style="background-color: #ffff00; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    .AsTableServiceQuery()
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    .Dump();    
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
        </pre>
        <p>
Yet, this query worked perfectly.  I got exactly 1 result as I expected. 
I was pretty stumped for a bit, then I realized what was happening.  You see <strong>FirstOrDefault </strong>will
not trigger the enumeration required to generate the necessary two round-trips to
table storage (first one gets continuation token, second gets results).  It just
will not force the continuation token to be chased.  Pretty simple fix it turns
out:
</p>
        <pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">var first = q.AsEnumerable().SingleOrDefault();</pre>
        </pre>
        <p>
Hours wasted for that one simple line fix.  Hope this saves someone the pain
I just went through.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=bac071c4-5ad5-46e3-a171-e0604b177532" />
      </body>
      <title>Handling Continuation Tokens in Windows Azure - Gotcha</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,bac071c4-5ad5-46e3-a171-e0604b177532.aspx</guid>
      <link>http://dunnry.com/blog/2011/08/24/HandlingContinuationTokensInWindowsAzureGotcha.aspx</link>
      <pubDate>Wed, 24 Aug 2011 15:18:53 GMT</pubDate>
      <description>&lt;p&gt;
I spent the last few hours debugging an issue where a query in Windows Azure table
storage was not returning any results, even though I knew that data was there.&amp;#160;
It didn't start that way of course.&amp;#160; Rather, stuff that should have been working
and previously was working, just stopped working.&amp;#160; Tracing through the code and
debugging showed me it was a case of a method not returning data when it should have.
&lt;/p&gt;
&lt;p&gt;
Now, I have known for quite some time that you must handle continuation tokens and
you can never assume that a query will return data always (&lt;a href="http://blog.smarx.com/posts/windows-azure-tables-expect-continuation-tokens-seriously" target="_blank"&gt;Steve
talks about it waaaay back when here&lt;/a&gt;).&amp;#160; However, what I did not know was
that different methods of enumeration will give you different results.&amp;#160; Let me
explain by showing the code.
&lt;/p&gt;
&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;var q = &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.CreateQuery() &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    .Where(filter)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    .Where(f =&amp;gt; f.PartitionKey.CompareTo(start.GetTicks()) &amp;gt; 0)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    .Take(1)
&lt;/pre&gt;&lt;pre style="background-color: #ffff00; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    .AsTableServiceQuery();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;var first = q.FirstOrDefault();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (first
!= &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;{
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; DateTime(&lt;span style="color: #0000ff"&gt;long&lt;/span&gt;.Parse(first.PartitionKey)); &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;}&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
In this scenario, you would assume that you have continuation tokens nailed because
you have the magical &lt;strong&gt;AsTableServiceQuery&lt;/strong&gt; extension method in use.&amp;#160;
It will magically chase the tokens until conclusion for you.&amp;#160; However, this code
does not work!&amp;#160; It will actually return &lt;strong&gt;null&lt;/strong&gt; in cases where
you do not hit the partition server that holds your query results on the first try.
&lt;/p&gt;
&lt;p&gt;
I could easily reproduce the query in LINQPad:
&lt;/p&gt;
&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;var q = ctx.CreateQuery&amp;lt;Foo&amp;gt;(&amp;quot;&lt;span style="color: #8b0000"&gt;WADPerformanceCountersTable&lt;/span&gt;&amp;quot;) &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    .Where(f =&amp;gt; f.RowKey.CompareTo(&amp;quot;&lt;span style="color: #8b0000"&gt;9232a4ca79344adf9b1a942d37deb44a&lt;/span&gt;&amp;quot;)
&amp;gt; 0 &amp;amp;&amp;amp; f.RowKey.CompareTo(&amp;quot;&lt;span style="color: #8b0000"&gt;9232a4ca79344adf9b1a942d37deb44a__|&lt;/span&gt;&amp;quot;)
&amp;lt; 0) &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    .Where(f =&amp;gt; f.PartitionKey.CompareTo(DateTime.Now.AddDays(-30).GetTicks()) &amp;gt; 0)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    .Take(1)
&lt;/pre&gt;&lt;pre style="background-color: #ffff00; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    .AsTableServiceQuery()
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    .Dump();    
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
Yet, this query worked perfectly.&amp;#160; I got exactly 1 result as I expected.&amp;#160;
I was pretty stumped for a bit, then I realized what was happening.&amp;#160; You see &lt;strong&gt;FirstOrDefault &lt;/strong&gt;will
not trigger the enumeration required to generate the necessary two round-trips to
table storage (first one gets continuation token, second gets results).&amp;#160; It just
will not force the continuation token to be chased.&amp;#160; Pretty simple fix it turns
out:
&lt;/p&gt;
&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;var first = q.AsEnumerable().SingleOrDefault();&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
Hours wasted for that one simple line fix.&amp;#160; Hope this saves someone the pain
I just went through.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=bac071c4-5ad5-46e3-a171-e0604b177532" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,bac071c4-5ad5-46e3-a171-e0604b177532.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=125de8e5-8729-4be3-a15a-61790ee28a06</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,125de8e5-8729-4be3-a15a-61790ee28a06.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,125de8e5-8729-4be3-a15a-61790ee28a06.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=125de8e5-8729-4be3-a15a-61790ee28a06</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I was working on a Windows Azure website solution the other day and suddenly started
getting this error when I tried to run the site with a debugger:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_2.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb.png" width="500" height="338" />
          </a>
        </p>
        <p>
This error is one of the hardest to diagnose.  Typically, it means that there
is something crashing in your website before the debugger can attach.  A good
candidate to check is your <strong>global.asax</strong> to see if you have changed
anything there.  I knew that the <strong>global.asax</strong> had not been changed,
so it was puzzling.  Naturally, I took the normal course of action:
</p>
        <ol>
          <li>
Run the website without debug inside the emulator.</li>
          <li>
Run the website with and without debugging outside the emulator.</li>
          <li>
Tried it on another machine</li>
        </ol>
        <p>
None of these methods gave me any clue what the issue was as they all worked perfectly
fine.  It was killing me that it only happened on debugging inside the emulator
and only on 1 machine (the one I really wanted to work).  I was desperately looking
for a solution that did not involve rebuilding the machine.   I turned on <a href="http://technet.microsoft.com/en-us/sysinternals/bb896647" target="_blank">SysInternal's
DebugView</a> to see if there were some debug messages telling me what the message
was.  I saw an interesting number of things, but nothing that really stood out
as the source of the error.  However, I did notice the process ID of what appeared
to be reporting errors:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_10.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb_4.png" width="504" height="75" />
          </a>
        </p>
        <p>
Looking at Process Explorer, I found this was for <strong>DFAgent.exe</strong> (the
Dev Fabric Agent).  I could see that it was starting with an environment variable,
so I took a look at where that was happening:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_12.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb_5.png" width="504" height="435" />
          </a>
        </p>
        <p>
That gave me a direction to start looking.  I opened the<strong> %UserProfile%\AppData\Local\Temp</strong> directory
and found a conveniently named file there called <strong>Visual Studio Web Debugger.log.</strong>  
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_4.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb_1.png" width="504" height="384" />
          </a>
        </p>
        <p>
A quick look at it showed it to be HTML, so one rename later and viola!
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_8.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb_3.png" width="504" height="433" />
          </a>
        </p>
        <p>
One of our developers had overridden the <strong>&lt;httpErrors&gt;</strong> setting
in web.config that was disallowed on my 1 machine.  I opened my <strong>applicationHost.config </strong>using
a Administatrive Notepad and sure enough:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_6.png">
            <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb_2.png" width="442" height="63" />
          </a>
        </p>
        <p>
So, the moral of the story is next time, just take a look at this log file and you
might find the issue.  I suspect the reason that this only happened on debug
and not when running without the debugger was that for some reason the debugger is
looking for a file called <strong>debugattach.aspx.</strong>  Since this file
does not exist on my machine, it throws a 404, which in turn tries to access the <strong>&lt;httpErrors&gt;</strong> setting,
which culminates in the 500.19 server error.  I hope this saves someone the many
hours I spent finding it and I hope it prevents you from rebuilding your machine as
I almost did.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=125de8e5-8729-4be3-a15a-61790ee28a06" />
      </body>
      <title>How to Diagnose Windows Azure Error Attaching Debugger Errors</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,125de8e5-8729-4be3-a15a-61790ee28a06.aspx</guid>
      <link>http://dunnry.com/blog/2011/07/14/HowToDiagnoseWindowsAzureErrorAttachingDebuggerErrors.aspx</link>
      <pubDate>Thu, 14 Jul 2011 21:40:48 GMT</pubDate>
      <description>&lt;p&gt;
I was working on a Windows Azure website solution the other day and suddenly started
getting this error when I tried to run the site with a debugger:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb.png" width="500" height="338" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
This error is one of the hardest to diagnose.&amp;#160; Typically, it means that there
is something crashing in your website before the debugger can attach.&amp;#160; A good
candidate to check is your &lt;strong&gt;global.asax&lt;/strong&gt; to see if you have changed
anything there.&amp;#160; I knew that the &lt;strong&gt;global.asax&lt;/strong&gt; had not been changed,
so it was puzzling.&amp;#160; Naturally, I took the normal course of action:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Run the website without debug inside the emulator.&lt;/li&gt;
&lt;li&gt;
Run the website with and without debugging outside the emulator.&lt;/li&gt;
&lt;li&gt;
Tried it on another machine&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
None of these methods gave me any clue what the issue was as they all worked perfectly
fine.&amp;#160; It was killing me that it only happened on debugging inside the emulator
and only on 1 machine (the one I really wanted to work).&amp;#160; I was desperately looking
for a solution that did not involve rebuilding the machine.&amp;#160;&amp;#160; I turned on &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896647" target="_blank"&gt;SysInternal's
DebugView&lt;/a&gt; to see if there were some debug messages telling me what the message
was.&amp;#160; I saw an interesting number of things, but nothing that really stood out
as the source of the error.&amp;#160; However, I did notice the process ID of what appeared
to be reporting errors:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_10.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb_4.png" width="504" height="75" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Looking at Process Explorer, I found this was for &lt;strong&gt;DFAgent.exe&lt;/strong&gt; (the
Dev Fabric Agent).&amp;#160; I could see that it was starting with an environment variable,
so I took a look at where that was happening:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_12.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb_5.png" width="504" height="435" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
That gave me a direction to start looking.&amp;#160; I opened the&lt;strong&gt; %UserProfile%\AppData\Local\Temp&lt;/strong&gt; directory
and found a conveniently named file there called &lt;strong&gt;Visual Studio Web Debugger.log.&lt;/strong&gt;&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb_1.png" width="504" height="384" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
A quick look at it showed it to be HTML, so one rename later and viola!
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_8.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb_3.png" width="504" height="433" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
One of our developers had overridden the &lt;strong&gt;&amp;lt;httpErrors&amp;gt;&lt;/strong&gt; setting
in web.config that was disallowed on my 1 machine.&amp;#160; I opened my &lt;strong&gt;applicationHost.config &lt;/strong&gt;using
a Administatrive Notepad and sure enough:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_6.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/e4a4ef81f4be_F08A/image_thumb_2.png" width="442" height="63" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
So, the moral of the story is next time, just take a look at this log file and you
might find the issue.&amp;#160; I suspect the reason that this only happened on debug
and not when running without the debugger was that for some reason the debugger is
looking for a file called &lt;strong&gt;debugattach.aspx.&lt;/strong&gt;&amp;#160; Since this file
does not exist on my machine, it throws a 404, which in turn tries to access the &lt;strong&gt;&amp;lt;httpErrors&amp;gt;&lt;/strong&gt; setting,
which culminates in the 500.19 server error.&amp;#160; I hope this saves someone the many
hours I spent finding it and I hope it prevents you from rebuilding your machine as
I almost did.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=125de8e5-8729-4be3-a15a-61790ee28a06" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,125de8e5-8729-4be3-a15a-61790ee28a06.aspx</comments>
      <category>.NET</category>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Visual Studio</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=d56e7787-3ab6-4de7-9333-d18068b68c26</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,d56e7787-3ab6-4de7-9333-d18068b68c26.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,d56e7787-3ab6-4de7-9333-d18068b68c26.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d56e7787-3ab6-4de7-9333-d18068b68c26</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of the common patterns I have noticed across many customers is the desire to download
a resource from the web and execute it as part of the bootup process for a Windows
Azure web or worker role.  The resource could be any number of things (e.g. exe,
zip, msi, cmd, etc.), but typically is something that the customer does not want to
package directly in the deployment package (cspkg) for size or update/maintainability
reasons.
</p>
        <p>
While the pattern is pretty common, the ways to approach the problem can certainly
vary.  A more complete solution will need to deal with the following issues:
</p>
        <ul>
          <li>
Downloading from arbitrary http(s) sources or Windows Azure blob storage 
</li>
          <li>
Logging 
</li>
          <li>
Parsing configuration from the RoleEnvironment or app.config 
</li>
          <li>
Interacting with the RoleEnvironment to get ports, DIP addresses, and Local Resource
paths 
</li>
          <li>
Unzipping resources 
</li>
          <li>
Launching processes 
</li>
          <li>
Ensuring that resources are only installed once (or downloaded and unzipped once) 
</li>
        </ul>
        <p>
With these goals in mind, we built the <a href="http://bootstrap.codeplex.com/" target="_blank">Windows
Azure Bootstrapper</a>.  It is a pretty simple tool to use and requires only
packaging of the .exe and the .config file itself in your role.  With these two
items in place, you can then script out fairly complicated installations.  For
example, you could prepare your roles with MVC3 using a command like this:
</p>
        <pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">bootstrapper.exe -get http://download.microsoft.com/download/F/3/1/F31EF055-3C46-4E35-AB7B-3261A303A3B6/AspNetMVC3ToolsUpdateSetup.exe -lr $lr(temp) -run $lr(temp)\AspNetMVC3ToolsUpdateSetup.exe -args /q
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
        </pre>
        <p>
Check out <a href="http://bootstrap.codeplex.com/" target="_blank">the project page</a> for
more examples, but the possibilities are pretty endless here.  One customer uses
the Bootstrapper to download agents and drivers from their blob storage account to
install at startup for their web and worker roles.  Other folks use it to simply
copy files out of blob storage and lay them out correctly on disk.
</p>
        <p>
Of course, none of this would be available in the community if not for the <a href="http://theagileadmin.com/" target="_blank">great
guys</a> working at National Instruments.  They allowed us to take this code
written for them and turn it over to the community.
</p>
        <p>
Enjoy and let us know your feedback or any bugs you find.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=d56e7787-3ab6-4de7-9333-d18068b68c26" />
      </body>
      <title>Windows Azure Bootstrapper</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,d56e7787-3ab6-4de7-9333-d18068b68c26.aspx</guid>
      <link>http://dunnry.com/blog/2011/05/17/WindowsAzureBootstrapper.aspx</link>
      <pubDate>Tue, 17 May 2011 18:35:17 GMT</pubDate>
      <description>&lt;p&gt;
One of the common patterns I have noticed across many customers is the desire to download
a resource from the web and execute it as part of the bootup process for a Windows
Azure web or worker role.&amp;#160; The resource could be any number of things (e.g. exe,
zip, msi, cmd, etc.), but typically is something that the customer does not want to
package directly in the deployment package (cspkg) for size or update/maintainability
reasons.
&lt;/p&gt;
&lt;p&gt;
While the pattern is pretty common, the ways to approach the problem can certainly
vary.&amp;#160; A more complete solution will need to deal with the following issues:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Downloading from arbitrary http(s) sources or Windows Azure blob storage 
&lt;/li&gt;
&lt;li&gt;
Logging 
&lt;/li&gt;
&lt;li&gt;
Parsing configuration from the RoleEnvironment or app.config 
&lt;/li&gt;
&lt;li&gt;
Interacting with the RoleEnvironment to get ports, DIP addresses, and Local Resource
paths 
&lt;/li&gt;
&lt;li&gt;
Unzipping resources 
&lt;/li&gt;
&lt;li&gt;
Launching processes 
&lt;/li&gt;
&lt;li&gt;
Ensuring that resources are only installed once (or downloaded and unzipped once) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
With these goals in mind, we built the &lt;a href="http://bootstrap.codeplex.com/" target="_blank"&gt;Windows
Azure Bootstrapper&lt;/a&gt;.&amp;#160; It is a pretty simple tool to use and requires only
packaging of the .exe and the .config file itself in your role.&amp;#160; With these two
items in place, you can then script out fairly complicated installations.&amp;#160; For
example, you could prepare your roles with MVC3 using a command like this:
&lt;/p&gt;
&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;bootstrapper.exe -get http://download.microsoft.com/download/F/3/1/F31EF055-3C46-4E35-AB7B-3261A303A3B6/AspNetMVC3ToolsUpdateSetup.exe -lr $lr(temp) -run $lr(temp)\AspNetMVC3ToolsUpdateSetup.exe -args /q
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
Check out &lt;a href="http://bootstrap.codeplex.com/" target="_blank"&gt;the project page&lt;/a&gt; for
more examples, but the possibilities are pretty endless here.&amp;#160; One customer uses
the Bootstrapper to download agents and drivers from their blob storage account to
install at startup for their web and worker roles.&amp;#160; Other folks use it to simply
copy files out of blob storage and lay them out correctly on disk.
&lt;/p&gt;
&lt;p&gt;
Of course, none of this would be available in the community if not for the &lt;a href="http://theagileadmin.com/" target="_blank"&gt;great
guys&lt;/a&gt; working at National Instruments.&amp;#160; They allowed us to take this code
written for them and turn it over to the community.
&lt;/p&gt;
&lt;p&gt;
Enjoy and let us know your feedback or any bugs you find.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=d56e7787-3ab6-4de7-9333-d18068b68c26" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,d56e7787-3ab6-4de7-9333-d18068b68c26.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Cumulux</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=c310b627-d0c0-4a6d-835a-49436ba0cb64</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,c310b627-d0c0-4a6d-835a-49436ba0cb64.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,c310b627-d0c0-4a6d-835a-49436ba0cb64.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=c310b627-d0c0-4a6d-835a-49436ba0cb64</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Just before I left Microsoft, I got a new Windows Phone 7 device.  I duly synced
it to the company Exchange server and forgot about it.  Once I left Microsoft,
I simply deleted the connection in WP7.  That turned out to be a big mistake. 
Not only did I lose the email and calendar (which I expected), but it also blew away
all my contacts on the phone as well.  That was tragic.  You see, I had
been building these contacts in my Outlook and phones for years.  These were
mostly personal contacts and lasted across many jobs.  These contacts existed
nowhere else in the same form.  Heck, I didn't even have my brother's phone number
as I only use my cell phone as my number memory.
</p>
        <p>
Well, it turns out that my old Windows Mobile phone was my saving grace.  Since
I had recently upgraded phones to my WP7 device, I had simply turned it off. 
However, it had a complete copy of my contacts.  Here is how I fixed it (and
will never have this issue again).
</p>
        <p>
First, you need to find and install the excellent little app called <a href="http://www.dotfred.net/default.htm" target="_blank">PIM
Backup</a>.  This app look pretty sophisticated as it will backup pretty much
everything on the device, including the contacts which is what I cared about. 
Once you backup the device, you should go ahead and delete the Exchange partnership
on the phone.  This will wipe the device of all your contacts.  You should
simply go and restore the backup at this point and your contacts will be back and
in good shape on the Windows Mobile phone.
</p>
        <p>
Next, you should create a new Exchange Sync partnership on Windows Mobile and this
time use Google.  It is super simple to setup and there are numerous guides (I
followed <a href="http://www.jayceooi.com/2010/11/18/how-to-export-windows-mobile-phone-contacts-calendar-mail-to-google-account/" target="_blank">this
one</a>).  You just need to remember to use your full email address for the username
and no domain.  I chose to only sync contacts and within a minute, I had all
of my phone's contacts in Google Contacts.
</p>
        <p>
What followed for the next 30 mins or so was a simple cleanup of years of contact
data.  I made extensive use of the 'Find &amp; Merge Duplicates' option in Google
Contacts.
</p>
        <p>
Now, WP7 phones will automatically sync with Google Contacts, so I thought everything
would be great.  However, there is one complication with that.  By default,
WP7 treats Windows Live as special.  It appears that you cannot choose to ignore
your Windows Live contacts and only use the Google Contacts.  This leads to an
ugly mess on the phone as you will potentially have duplicate accounts or partial
data in each.
</p>
        <p>
The solution is to make sure that your Windows Live account is up to date with the
right contacts as well.  For me, this was a simple as opening Windows Live Mail,
deleting every single contact in it and importing the contacts from Google Contact. 
You can export from Google Contacts pretty easily, so this was a very quick operation. 
In about 5 mins time, my WP7 phone was synced and ready with my years of contacts. 
Furthermore, this shouldn't be an issue anymore as I know have the contacts stored
in both Google and Windows Live.
</p>
        <p>
Next time, I will remember to delete partnerships with great care.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=c310b627-d0c0-4a6d-835a-49436ba0cb64" />
      </body>
      <title>Exporting your Windows Mobile Contacts</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,c310b627-d0c0-4a6d-835a-49436ba0cb64.aspx</guid>
      <link>http://dunnry.com/blog/2011/02/23/ExportingYourWindowsMobileContacts.aspx</link>
      <pubDate>Wed, 23 Feb 2011 01:31:50 GMT</pubDate>
      <description>&lt;p&gt;
Just before I left Microsoft, I got a new Windows Phone 7 device.&amp;#160; I duly synced
it to the company Exchange server and forgot about it.&amp;#160; Once I left Microsoft,
I simply deleted the connection in WP7.&amp;#160; That turned out to be a big mistake.&amp;#160;
Not only did I lose the email and calendar (which I expected), but it also blew away
all my contacts on the phone as well.&amp;#160; That was tragic.&amp;#160; You see, I had
been building these contacts in my Outlook and phones for years.&amp;#160; These were
mostly personal contacts and lasted across many jobs.&amp;#160; These contacts existed
nowhere else in the same form.&amp;#160; Heck, I didn't even have my brother's phone number
as I only use my cell phone as my number memory.
&lt;/p&gt;
&lt;p&gt;
Well, it turns out that my old Windows Mobile phone was my saving grace.&amp;#160; Since
I had recently upgraded phones to my WP7 device, I had simply turned it off.&amp;#160;
However, it had a complete copy of my contacts.&amp;#160; Here is how I fixed it (and
will never have this issue again).
&lt;/p&gt;
&lt;p&gt;
First, you need to find and install the excellent little app called &lt;a href="http://www.dotfred.net/default.htm" target="_blank"&gt;PIM
Backup&lt;/a&gt;.&amp;#160; This app look pretty sophisticated as it will backup pretty much
everything on the device, including the contacts which is what I cared about.&amp;#160;
Once you backup the device, you should go ahead and delete the Exchange partnership
on the phone.&amp;#160; This will wipe the device of all your contacts.&amp;#160; You should
simply go and restore the backup at this point and your contacts will be back and
in good shape on the Windows Mobile phone.
&lt;/p&gt;
&lt;p&gt;
Next, you should create a new Exchange Sync partnership on Windows Mobile and this
time use Google.&amp;#160; It is super simple to setup and there are numerous guides (I
followed &lt;a href="http://www.jayceooi.com/2010/11/18/how-to-export-windows-mobile-phone-contacts-calendar-mail-to-google-account/" target="_blank"&gt;this
one&lt;/a&gt;).&amp;#160; You just need to remember to use your full email address for the username
and no domain.&amp;#160; I chose to only sync contacts and within a minute, I had all
of my phone's contacts in Google Contacts.
&lt;/p&gt;
&lt;p&gt;
What followed for the next 30 mins or so was a simple cleanup of years of contact
data.&amp;#160; I made extensive use of the 'Find &amp;amp; Merge Duplicates' option in Google
Contacts.
&lt;/p&gt;
&lt;p&gt;
Now, WP7 phones will automatically sync with Google Contacts, so I thought everything
would be great.&amp;#160; However, there is one complication with that.&amp;#160; By default,
WP7 treats Windows Live as special.&amp;#160; It appears that you cannot choose to ignore
your Windows Live contacts and only use the Google Contacts.&amp;#160; This leads to an
ugly mess on the phone as you will potentially have duplicate accounts or partial
data in each.
&lt;/p&gt;
&lt;p&gt;
The solution is to make sure that your Windows Live account is up to date with the
right contacts as well.&amp;#160; For me, this was a simple as opening Windows Live Mail,
deleting every single contact in it and importing the contacts from Google Contact.&amp;#160;
You can export from Google Contacts pretty easily, so this was a very quick operation.&amp;#160;
In about 5 mins time, my WP7 phone was synced and ready with my years of contacts.&amp;#160;
Furthermore, this shouldn't be an issue anymore as I know have the contacts stored
in both Google and Windows Live.
&lt;/p&gt;
&lt;p&gt;
Next time, I will remember to delete partnerships with great care.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=c310b627-d0c0-4a6d-835a-49436ba0cb64" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,c310b627-d0c0-4a6d-835a-49436ba0cb64.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=12e10e31-0b95-47d4-8a4e-85559a01af4a</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,12e10e31-0b95-47d4-8a4e-85559a01af4a.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,12e10e31-0b95-47d4-8a4e-85559a01af4a.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=12e10e31-0b95-47d4-8a4e-85559a01af4a</wfw:commentRss>
      <slash:comments>6</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As some of you may know, I recently left Microsoft after almost 4 years.  It
was a wonderful experience and I met and worked with some truly great people there. 
I was lucky enough to join at the time when the cloud was just getting started at
Microsoft.  Code words like CloudDB, Strata, Sitka, Red Dog, and others I won't
mention here flew around like crazy.
</p>
        <p>
I started as the SQL Server Data Services (SSDS) evangelist and later became the Windows
Azure Evangelist (after SSDS eventually became SQL Azure).  For the last 2 years,
Windows Azure has been my life and it was great seeing a technology very rapidly grow
from CTP to a full featured platform in such a short time.
</p>
        <p>
Well, I am not moving far from Windows Azure - I still strongly believe in what Microsoft
has done here.  I recently joined <a href="http://www.cumulux.com" target="_blank">Cumulux</a> as
Director of Cloud Services.  I will be driving product strategy, some key customer
engagements, and take part in the leadership team there.  Cumulux is a close
Microsoft partner with a Windows Azure focus, so it is a great fit for me for both
personal as well as professional reasons.
</p>
        <p>
While I will miss the great folks I got to work with at Microsoft and being in the
thick of everything, I am very excited to begin this new career path with Cumulux.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=12e10e31-0b95-47d4-8a4e-85559a01af4a" />
      </body>
      <title>A new Career Path</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,12e10e31-0b95-47d4-8a4e-85559a01af4a.aspx</guid>
      <link>http://dunnry.com/blog/2011/01/12/ANewCareerPath.aspx</link>
      <pubDate>Wed, 12 Jan 2011 04:08:44 GMT</pubDate>
      <description>&lt;p&gt;
As some of you may know, I recently left Microsoft after almost 4 years.&amp;#160; It
was a wonderful experience and I met and worked with some truly great people there.&amp;#160;
I was lucky enough to join at the time when the cloud was just getting started at
Microsoft.&amp;#160; Code words like CloudDB, Strata, Sitka, Red Dog, and others I won't
mention here flew around like crazy.
&lt;/p&gt;
&lt;p&gt;
I started as the SQL Server Data Services (SSDS) evangelist and later became the Windows
Azure Evangelist (after SSDS eventually became SQL Azure).&amp;#160; For the last 2 years,
Windows Azure has been my life and it was great seeing a technology very rapidly grow
from CTP to a full featured platform in such a short time.
&lt;/p&gt;
&lt;p&gt;
Well, I am not moving far from Windows Azure - I still strongly believe in what Microsoft
has done here.&amp;#160; I recently joined &lt;a href="http://www.cumulux.com" target="_blank"&gt;Cumulux&lt;/a&gt; as
Director of Cloud Services.&amp;#160; I will be driving product strategy, some key customer
engagements, and take part in the leadership team there.&amp;#160; Cumulux is a close
Microsoft partner with a Windows Azure focus, so it is a great fit for me for both
personal as well as professional reasons.
&lt;/p&gt;
&lt;p&gt;
While I will miss the great folks I got to work with at Microsoft and being in the
thick of everything, I am very excited to begin this new career path with Cumulux.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=12e10e31-0b95-47d4-8a4e-85559a01af4a" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,12e10e31-0b95-47d4-8a4e-85559a01af4a.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Cumulux</category>
      <category>Personal</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=daa4a5a9-be09-4d5f-8c39-94a06acefe67</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,daa4a5a9-be09-4d5f-8c39-94a06acefe67.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,daa4a5a9-be09-4d5f-8c39-94a06acefe67.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=daa4a5a9-be09-4d5f-8c39-94a06acefe67</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <em>
            <strong>Update</strong>:  Looks like </em>
          <a href="http://www.wadewegner.com/2010/12/using-web-deploy-with-windows-azure-for-rapid-development/" target="_blank">
            <em>Wade
also blogged about this</em>
          </a>
          <em>, showing a similar way with some early scripts
I wrote.  However, there are some important differences around versioning of
WebDeploy and creating users that you should pay attention to here.  Also, I
am using plugins, which are much easier to consume.</em>
        </p>
        <p>
One of the features announced at PDC was the coming ability to use the standard IIS7
WebDeploy capability with Windows Azure.  This is exciting news, but it comes
with an important caveat.  This feature is strictly for development purposes
only.  That is, you should not expect anything you deploy using WebDeploy to
persist longterm on your running Windows Azure instances.  If you are familiar
with Windows Azure, you know the reason is that any changes to the OS post-startup
are not durable.
</p>
        <p>
So, the use case for WebDeploy in Windows Azure is in the case of a single instance
of a role during development.  The idea is that you would:
</p>
        <ol>
          <li>
Deploy your hosted service (using the .cspkg upload and deploy) with a single instance
with WebDeploy enabled. 
</li>
          <li>
Use WebDeploy on subsequent deploys for instant feedback 
</li>
          <li>
Deploy the final version again using .cspkg (without WebDeploy enabled) so the results
are durable with at least 2 instances. 
</li>
        </ol>
        <p>
The Visual Studio team will shortly be supplying some tooling to make this scenario
simple.  However, in the interim, it is relatively straightforward to implement
this yourself and do what the tooling will eventually do for you.
</p>
        <p>
If you look at the Windows Azure Training Kit, you will find the <a href="http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_advancedwebandworkerrolesvs2010lab_topic4#_Toc278819398#_Toc278819398" target="_blank">Advanced
Web and Worker Lab Exercise 3</a> and it will show you the main things to get this
done.  You simply need to extrapolate from this to get the whole thing working.
</p>
        <p>
We will be using Startup Tasks to perform a little bit of bootstrapping when the role
instance (note the singular) starts in order to use Web Deploy.  This will be
implemented using the Role Plugin feature to make this a snap to consume.  Right
now, the plugins are undocumented, but if you peruse your SDK bin folder, it won't
be too hard to figure out how they work.
</p>
        <p>
The nice thing about using a plugin is that you don't need to litter your service
definition with anything in order to use the feature.  You simply need to include
a single "Import" element and you are done!
</p>
        <h2>Install the Plugin
</h2>
        <iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 98px; padding-right: 0px; height: 115px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-4225352e17899c6d.office.live.com/embedicon.aspx/Public/WebDeploy.zip" frameborder="0" marginwidth="0" scrolling="no">
        </iframe>
        <p>
In order to use this feature, simply extract the contents of the zip file into <strong>"%programfiles%\Windows
Azure SDK\v1.3\bin\plugins\WebDeploy"</strong>.  You might have to extract
the files locally in your profile first and copy them into this location if you run
UAC.  At the end of the day, you need a folder called "WebDeploy" in
this location with all the files in this zip in it.
</p>
        <h2>Use the Plugin
</h2>
        <p>
To use the plugin you simply need to add one line to your Service Definition:
</p>
        <pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #800000">Imports</span>
            <span style="color: #0000ff">&gt;</span>
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #800000">Import</span>
            <span style="color: #ff0000">moduleName</span>=<span style="color: #0000ff">"RemoteAccess"</span><span style="color: #0000ff">/&gt;</span></pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #800000">Import</span>
            <span style="color: #ff0000">moduleName</span>=<span style="color: #0000ff">"RemoteForwarder"</span><span style="color: #0000ff">/&gt;</span></pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">&lt;</span>
            <span style="color: #800000">Import</span>
            <span style="color: #ff0000">moduleName</span>=<span style="color: #0000ff">"WebDeploy"</span><span style="color: #0000ff">/&gt;</span></pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">&lt;/</span>
            <span style="color: #800000">Imports</span>
            <span style="color: #0000ff">&gt;</span>
          </pre>
        </pre>
        <p>
Notice, in my example, I am also including the Remote Access and Remote Forwarder
plugins as well.  You must have RemoteAccess enabled to use this plugin as we
will rely on the user created here.  The Remote Forwarder is required on one
role in your solution.
</p>
        <p>
Next, you should hit publish on the <strong>Windows Azure project </strong>(not Web
Site) and setup an RDP user.  We will be using this same user later in order
to deploy because by default the RDP user is also an Admin with permission to use
Web Deploy.  Alternatively, you could create an admin user with a Startup Task,
but this method is easier (and you get RDP).  If you have not setup the certificates
for RDP access before, it is a <a href="http://blog.syntaxc4.net/post/2010/12/16/Setting-up-RDP-to-a-Windows-Azure-Instance-Part-1.aspx" target="_blank">one
time process outlined here</a>.
</p>
        <p>
 
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_6.png">
            <img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_thumb_2.png" width="454" height="428" />
          </a>
        </p>
        <p>
 
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_4.png">
            <img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_thumb_1.png" width="429" height="426" />
          </a>
        </p>
        <p>
Now, you publish this to Windows Azure using the normal Windows Azure publishing process:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_8.png">
            <img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_thumb_3.png" width="504" height="170" />
          </a>
        </p>
        <p>
That's it.  Your running instance has WebDeploy and the IIS Management Service
running now.  All you had to do was import the WebDeploy plugin and make sure
you also used RDP (which most developers will enable during development anyway).
</p>
        <p>
At this point, it is a pretty simple matter to publish using WebDeploy.  Just
right click the <strong>Web Site </strong>(not the Cloud Project) and hit publish:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_12.png">
            <img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_thumb_5.png" width="470" height="633" />
          </a>
        </p>
        <p>
You will need to type in the name of your .cloudapp.net project in the Service URL. 
By default, it will assume port 8172; if you have chosen a different public VIP port
(by editing the plugin -see *hint below), here is where you need to update it (using
the full https:// syntax).
</p>
        <p>
Next, you need to update the Site/Application.  The format for this is <em>ROLENAME</em>_IN_0_<em>SITENAME</em>,
so you need to look in your Service Definition to find this:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_16.png">
            <img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_thumb_7.png" width="504" height="337" />
          </a>
        </p>
        <p>
Notice, in my example, my ROLENAME is "WebUX" and the Site name is "Web". 
This will differ for each Web Role potentially, so make sure you check this carefully.
</p>
        <p>
Finally, check the "Allow untrusted certificate" option and use the same
RDP username and password you created on deploy.  That's all.  It should
be possible for you to use Web Deploy now with your running instance:  Hit Publish
and Done!
</p>
        <h2>How it works
</h2>
        <p>
If you check the plugin, you will see that we use 2 scripts and WebPI to do this. 
Actually, this is the command line version of WebPI, so it will run without prompts. 
You can also <a href="http://go.microsoft.com/?linkid=9752821" target="_blank">download
it</a>, but it is packaged already in the plugin.
</p>
        <p>
The first script, called EnableWebAdmin.cmd simply enables the IIS Management service
and gets it running.  By default, this sets up the service to run and listen
on port 8172.  If you check the .csplugin file, you will notice we have opened
that port on the Load Balancer as well.
</p>
        <pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">start /w ocsetup IIS-ManagementService
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WebManagement\Server /v EnableRemoteManagement /t REG_DWORD /d 1 /f
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">net start wmsvc
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">sc config WMSVC start= auto
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">exit /b 0</pre>
        </pre>
        <p>
          <strong>*Hint: </strong>if you work at a place like Microsoft that prevents ports
other than 443 to host SSL traffic, here would be a good place to map 443 to 8172
in order to deploy.  For most normal environments, this is not necessary.
</p>
        <p>
Next, we have the proper WebDeploy installation command using WebPI command line.
</p>
        <pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">@echo off
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">ECHO "Starting WebDeploy Installation" &gt;&gt; log.txt
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">"%~dp0webpicmd\WebPICmdLine.exe" /Products: WDeploy /xml:https://www.microsoft.com/web/webpi/2.0/RTM/WebProductList.xml /log:webdeploy.txt
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <p>
ECHO "Completed WebDeploy Installation" &gt;&gt; log.txt
</p>
            <p>
 
</p>
            <p>
net stop wmsvc
</p>
            <p>
net start wmsvc
</p>
          </pre>
        </pre>
        <p>
You will notice one oddity here - namely, we are using the WebPI 2.0 feed to install
an older version of WebDeploy (v1.1).  If you leave this off, it will default
to the 3.0 version of WebPI that uses the Web Deploy 2.0 RC.  In my testing,
Web Deploy 2.0 RC only works sporadically and usually not at all.  The 1.1 version
is well integrated in VS tooling, so I would suggest this one instead until 2.0 works
better.
</p>
        <p>
Also, you will notice that I am stopping and restarting the IIS Management Service
here as well.  In my testing, WebDeploy was was unreliable on the Windows Server
2008 R2 family (osFamily=2).  Starting and stopping the service seems to fix
it.
</p>
        <h2>Final Warning
</h2>
        <p>
Please bear in mind that this method is only for proto-typing and rapid development. 
Since the changes are not persisted, they will disappear the next time you are healed
by the fabric controller.  Eventually, the Visual Studio team will release their
own plugin that does essentially the same thing and you can stop using this. 
In the meantime, have fun!
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=daa4a5a9-be09-4d5f-8c39-94a06acefe67" />
      </body>
      <title>Using WebDeploy with Windows Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,daa4a5a9-be09-4d5f-8c39-94a06acefe67.aspx</guid>
      <link>http://dunnry.com/blog/2010/12/20/UsingWebDeployWithWindowsAzure.aspx</link>
      <pubDate>Mon, 20 Dec 2010 01:35:09 GMT</pubDate>
      <description>&lt;p&gt;
&lt;em&gt;&lt;strong&gt;Update&lt;/strong&gt;:&amp;#160; Looks like &lt;/em&gt;&lt;a href="http://www.wadewegner.com/2010/12/using-web-deploy-with-windows-azure-for-rapid-development/" target="_blank"&gt;&lt;em&gt;Wade
also blogged about this&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, showing a similar way with some early scripts
I wrote.&amp;#160; However, there are some important differences around versioning of
WebDeploy and creating users that you should pay attention to here.&amp;#160; Also, I
am using plugins, which are much easier to consume.&lt;/em&gt;
&lt;/p&gt;
&lt;p&gt;
One of the features announced at PDC was the coming ability to use the standard IIS7
WebDeploy capability with Windows Azure.&amp;#160; This is exciting news, but it comes
with an important caveat.&amp;#160; This feature is strictly for development purposes
only.&amp;#160; That is, you should not expect anything you deploy using WebDeploy to
persist longterm on your running Windows Azure instances.&amp;#160; If you are familiar
with Windows Azure, you know the reason is that any changes to the OS post-startup
are not durable.
&lt;/p&gt;
&lt;p&gt;
So, the use case for WebDeploy in Windows Azure is in the case of a single instance
of a role during development.&amp;#160; The idea is that you would:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Deploy your hosted service (using the .cspkg upload and deploy) with a single instance
with WebDeploy enabled. 
&lt;/li&gt;
&lt;li&gt;
Use WebDeploy on subsequent deploys for instant feedback 
&lt;/li&gt;
&lt;li&gt;
Deploy the final version again using .cspkg (without WebDeploy enabled) so the results
are durable with at least 2 instances. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
The Visual Studio team will shortly be supplying some tooling to make this scenario
simple.&amp;#160; However, in the interim, it is relatively straightforward to implement
this yourself and do what the tooling will eventually do for you.
&lt;/p&gt;
&lt;p&gt;
If you look at the Windows Azure Training Kit, you will find the &lt;a href="http://msdn.microsoft.com/en-us/wazplatformtrainingcourse_advancedwebandworkerrolesvs2010lab_topic4#_Toc278819398#_Toc278819398" target="_blank"&gt;Advanced
Web and Worker Lab Exercise 3&lt;/a&gt; and it will show you the main things to get this
done.&amp;#160; You simply need to extrapolate from this to get the whole thing working.
&lt;/p&gt;
&lt;p&gt;
We will be using Startup Tasks to perform a little bit of bootstrapping when the role
instance (note the singular) starts in order to use Web Deploy.&amp;#160; This will be
implemented using the Role Plugin feature to make this a snap to consume.&amp;#160; Right
now, the plugins are undocumented, but if you peruse your SDK bin folder, it won't
be too hard to figure out how they work.
&lt;/p&gt;
&lt;p&gt;
The nice thing about using a plugin is that you don't need to litter your service
definition with anything in order to use the feature.&amp;#160; You simply need to include
a single &amp;quot;Import&amp;quot; element and you are done!
&lt;/p&gt;
&lt;h2&gt;Install the Plugin
&lt;/h2&gt;
&lt;iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 98px; padding-right: 0px; height: 115px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-4225352e17899c6d.office.live.com/embedicon.aspx/Public/WebDeploy.zip" frameborder="0" marginwidth="0" scrolling="no"&gt;
&lt;/iframe&gt;
&lt;p&gt;
In order to use this feature, simply extract the contents of the zip file into &lt;strong&gt;&amp;quot;%programfiles%\Windows
Azure SDK\v1.3\bin\plugins\WebDeploy&amp;quot;&lt;/strong&gt;.&amp;#160; You might have to extract
the files locally in your profile first and copy them into this location if you run
UAC.&amp;#160; At the end of the day, you need a folder called &amp;quot;WebDeploy&amp;quot; in
this location with all the files in this zip in it.
&lt;/p&gt;
&lt;h2&gt;Use the Plugin
&lt;/h2&gt;
&lt;p&gt;
To use the plugin you simply need to add one line to your Service Definition:
&lt;/p&gt;
&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Imports&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;      &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Import&lt;/span&gt; &lt;span style="color: #ff0000"&gt;moduleName&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;RemoteAccess&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;      &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Import&lt;/span&gt; &lt;span style="color: #ff0000"&gt;moduleName&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;RemoteForwarder&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;      &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Import&lt;/span&gt; &lt;span style="color: #ff0000"&gt;moduleName&lt;/span&gt;=&lt;span style="color: #0000ff"&gt;&amp;quot;WebDeploy&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Imports&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
Notice, in my example, I am also including the Remote Access and Remote Forwarder
plugins as well.&amp;#160; You must have RemoteAccess enabled to use this plugin as we
will rely on the user created here.&amp;#160; The Remote Forwarder is required on one
role in your solution.
&lt;/p&gt;
&lt;p&gt;
Next, you should hit publish on the &lt;strong&gt;Windows Azure project &lt;/strong&gt;(not Web
Site) and setup an RDP user.&amp;#160; We will be using this same user later in order
to deploy because by default the RDP user is also an Admin with permission to use
Web Deploy.&amp;#160; Alternatively, you could create an admin user with a Startup Task,
but this method is easier (and you get RDP).&amp;#160; If you have not setup the certificates
for RDP access before, it is a &lt;a href="http://blog.syntaxc4.net/post/2010/12/16/Setting-up-RDP-to-a-Windows-Azure-Instance-Part-1.aspx" target="_blank"&gt;one
time process outlined here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_thumb_2.png" width="454" height="428" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_thumb_1.png" width="429" height="426" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Now, you publish this to Windows Azure using the normal Windows Azure publishing process:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_thumb_3.png" width="504" height="170" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
That's it.&amp;#160; Your running instance has WebDeploy and the IIS Management Service
running now.&amp;#160; All you had to do was import the WebDeploy plugin and make sure
you also used RDP (which most developers will enable during development anyway).
&lt;/p&gt;
&lt;p&gt;
At this point, it is a pretty simple matter to publish using WebDeploy.&amp;#160; Just
right click the &lt;strong&gt;Web Site &lt;/strong&gt;(not the Cloud Project) and hit publish:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_12.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_thumb_5.png" width="470" height="633" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
You will need to type in the name of your .cloudapp.net project in the Service URL.&amp;#160;
By default, it will assume port 8172; if you have chosen a different public VIP port
(by editing the plugin -see *hint below), here is where you need to update it (using
the full https:// syntax).
&lt;/p&gt;
&lt;p&gt;
Next, you need to update the Site/Application.&amp;#160; The format for this is &lt;em&gt;ROLENAME&lt;/em&gt;_IN_0_&lt;em&gt;SITENAME&lt;/em&gt;,
so you need to look in your Service Definition to find this:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_16.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Using-WebDeploy-with-Windows-Azure_12C75/image_thumb_7.png" width="504" height="337" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Notice, in my example, my ROLENAME is &amp;quot;WebUX&amp;quot; and the Site name is &amp;quot;Web&amp;quot;.&amp;#160;
This will differ for each Web Role potentially, so make sure you check this carefully.
&lt;/p&gt;
&lt;p&gt;
Finally, check the &amp;quot;Allow untrusted certificate&amp;quot; option and use the same
RDP username and password you created on deploy.&amp;#160; That's all.&amp;#160; It should
be possible for you to use Web Deploy now with your running instance:&amp;#160; Hit Publish
and Done!
&lt;/p&gt;
&lt;h2&gt;How it works
&lt;/h2&gt;
&lt;p&gt;
If you check the plugin, you will see that we use 2 scripts and WebPI to do this.&amp;#160;
Actually, this is the command line version of WebPI, so it will run without prompts.&amp;#160;
You can also &lt;a href="http://go.microsoft.com/?linkid=9752821" target="_blank"&gt;download
it&lt;/a&gt;, but it is packaged already in the plugin.
&lt;/p&gt;
&lt;p&gt;
The first script, called EnableWebAdmin.cmd simply enables the IIS Management service
and gets it running.&amp;#160; By default, this sets up the service to run and listen
on port 8172.&amp;#160; If you check the .csplugin file, you will notice we have opened
that port on the Load Balancer as well.
&lt;/p&gt;
&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;start /w ocsetup IIS-ManagementService
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WebManagement\Server /v EnableRemoteManagement /t REG_DWORD /d 1 /f
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;net start wmsvc
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;sc config WMSVC start= auto
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;exit /b 0&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
&lt;strong&gt;*Hint: &lt;/strong&gt;if you work at a place like Microsoft that prevents ports
other than 443 to host SSL traffic, here would be a good place to map 443 to 8172
in order to deploy.&amp;#160; For most normal environments, this is not necessary.
&lt;/p&gt;
&lt;p&gt;
Next, we have the proper WebDeploy installation command using WebPI command line.
&lt;/p&gt;
&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;@echo off
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;ECHO &amp;quot;Starting WebDeploy Installation&amp;quot; &amp;gt;&amp;gt; log.txt
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&amp;quot;%~dp0webpicmd\WebPICmdLine.exe&amp;quot; /Products: WDeploy /xml:https://www.microsoft.com/web/webpi/2.0/RTM/WebProductList.xml /log:webdeploy.txt
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;
&lt;p&gt;
ECHO &amp;quot;Completed WebDeploy Installation&amp;quot; &amp;gt;&amp;gt; log.txt
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
net stop wmsvc
&lt;/p&gt;
&lt;p&gt;
net start wmsvc
&lt;/p&gt;
&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
You will notice one oddity here - namely, we are using the WebPI 2.0 feed to install
an older version of WebDeploy (v1.1).&amp;#160; If you leave this off, it will default
to the 3.0 version of WebPI that uses the Web Deploy 2.0 RC.&amp;#160; In my testing,
Web Deploy 2.0 RC only works sporadically and usually not at all.&amp;#160; The 1.1 version
is well integrated in VS tooling, so I would suggest this one instead until 2.0 works
better.
&lt;/p&gt;
&lt;p&gt;
Also, you will notice that I am stopping and restarting the IIS Management Service
here as well.&amp;#160; In my testing, WebDeploy was was unreliable on the Windows Server
2008 R2 family (osFamily=2).&amp;#160; Starting and stopping the service seems to fix
it.
&lt;/p&gt;
&lt;h2&gt;Final Warning
&lt;/h2&gt;
&lt;p&gt;
Please bear in mind that this method is only for proto-typing and rapid development.&amp;#160;
Since the changes are not persisted, they will disappear the next time you are healed
by the fabric controller.&amp;#160; Eventually, the Visual Studio team will release their
own plugin that does essentially the same thing and you can stop using this.&amp;#160;
In the meantime, have fun!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=daa4a5a9-be09-4d5f-8c39-94a06acefe67" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,daa4a5a9-be09-4d5f-8c39-94a06acefe67.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=bde201b9-41f0-48b1-8a0e-b5f197ed4cb4</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,bde201b9-41f0-48b1-8a0e-b5f197ed4cb4.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,bde201b9-41f0-48b1-8a0e-b5f197ed4cb4.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=bde201b9-41f0-48b1-8a0e-b5f197ed4cb4</wfw:commentRss>
      <slash:comments>3</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you haven't already read on the official blog, <a href="http://blogs.msdn.com/b/windowsazure/archive/2010/11/29/just-released-windows-azure-sdk-1-3-and-the-new-windows-azure-management-portal.aspx">Windows
Azure SDK 1.3 was released</a> (along with Visual Studio tooling).  Rather than
rehash what it contains, go read that blog post if you want to know what is included
(and there are lots of great features).  Even better, goto <a href="microsoftpdc.com">microsoftpdc.com</a> and
watch the videos on the specific features.
</p>
        <p>
If you are a user of the <a href="http://code.msdn.com/windowsazuremmc">Windows Azure
MMC</a> or the <a href="http://code.msdn.com/azurecmdlets">Windows Azure Service Management
Cmdlets</a>, you might notice that stuff gets broken on new installs.  The underlying
issue is that the MMC snapin was written against the 1.0 version of the Storage Client. 
With the 1.3 SDK, the Storage Client is now at 1.1.  So, this means you can fix
this two ways:
</p>
        <ol>
          <li>
Copy an older 1.2 SDK version of the Storage Client into the MMC's "release"
directory.  Of course, you need to either have the .dll handy or go find it. 
If you have the MMC installed prior to SDK 1.3, you probably already have it in the
release directory and you are good to go. 
</li>
          <li>
Use Assembly Redirection to allow the MMC or Powershell to call into the 1.1 client
instead of the 1.0 client. 
</li>
        </ol>
        <p>
To use Assembly Redirection, just create a "mmc.exe.config" file for MMC
(or "Powershell.exe.config" for cmdlets) and place it in the <em>%windir%\system32</em> directory. 
Inside the .config file, just use the following xml:
</p>
        <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
          <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">configuration</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">runtime</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">assemblyBinding</span>
              <span style="color: #ff0000">xmlns</span>
              <span style="color: #0000ff">="urn:schemas-microsoft-com:asm.v1"</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">dependentAssembly</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">assemblyIdentity</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="Microsoft.WindowsAzure.StorageClient"</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #ff0000">publicKeyToken</span>
              <span style="color: #0000ff">="31bf3856ad364e35"</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #ff0000">culture</span>
              <span style="color: #0000ff">="neutral"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">bindingRedirect</span>
              <span style="color: #ff0000">oldVersion</span>
              <span style="color: #0000ff">="1.0.0.0"</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #ff0000">newVersion</span>
              <span style="color: #0000ff">="1.1.0.0"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">dependentAssembly</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">dependentAssembly</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">assemblyIdentity</span>
              <span style="color: #ff0000">name</span>
              <span style="color: #0000ff">="Microsoft.WindowsAzure.StorageClient"</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #ff0000">publicKeyToken</span>
              <span style="color: #0000ff">="31bf3856ad364e35"</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #ff0000">culture</span>
              <span style="color: #0000ff">="neutral"</span>
              <span style="color: #0000ff">/&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;</span>
              <span style="color: #800000">publisherPolicy</span>
              <span style="color: #ff0000">apply</span>
              <span style="color: #0000ff">="no"
/</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">dependentAssembly</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"> </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">assemblyBinding</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">runtime</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
            <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">
              <span style="color: #0000ff">&lt;/</span>
              <span style="color: #800000">configuration</span>
              <span style="color: #0000ff">&gt;</span>
            </pre>
            <!--CRLF-->
          </div>
        </div>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=bde201b9-41f0-48b1-8a0e-b5f197ed4cb4" />
      </body>
      <title>Using Windows Azure MMC and Cmdlet with Windows Azure SDK 1.3</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,bde201b9-41f0-48b1-8a0e-b5f197ed4cb4.aspx</guid>
      <link>http://dunnry.com/blog/2010/11/30/UsingWindowsAzureMMCAndCmdletWithWindowsAzureSDK13.aspx</link>
      <pubDate>Tue, 30 Nov 2010 20:01:23 GMT</pubDate>
      <description>&lt;p&gt;
If you haven't already read on the official blog, &lt;a href="http://blogs.msdn.com/b/windowsazure/archive/2010/11/29/just-released-windows-azure-sdk-1-3-and-the-new-windows-azure-management-portal.aspx"&gt;Windows
Azure SDK 1.3 was released&lt;/a&gt; (along with Visual Studio tooling).&amp;#160; Rather than
rehash what it contains, go read that blog post if you want to know what is included
(and there are lots of great features).&amp;#160; Even better, goto &lt;a href="microsoftpdc.com"&gt;microsoftpdc.com&lt;/a&gt; and
watch the videos on the specific features.
&lt;/p&gt;
&lt;p&gt;
If you are a user of the &lt;a href="http://code.msdn.com/windowsazuremmc"&gt;Windows Azure
MMC&lt;/a&gt; or the &lt;a href="http://code.msdn.com/azurecmdlets"&gt;Windows Azure Service Management
Cmdlets&lt;/a&gt;, you might notice that stuff gets broken on new installs.&amp;#160; The underlying
issue is that the MMC snapin was written against the 1.0 version of the Storage Client.&amp;#160;
With the 1.3 SDK, the Storage Client is now at 1.1.&amp;#160; So, this means you can fix
this two ways:
&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
Copy an older 1.2 SDK version of the Storage Client into the MMC's &amp;quot;release&amp;quot;
directory.&amp;#160; Of course, you need to either have the .dll handy or go find it.&amp;#160;
If you have the MMC installed prior to SDK 1.3, you probably already have it in the
release directory and you are good to go. 
&lt;/li&gt;
&lt;li&gt;
Use Assembly Redirection to allow the MMC or Powershell to call into the 1.1 client
instead of the 1.0 client. 
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;
To use Assembly Redirection, just create a &amp;quot;mmc.exe.config&amp;quot; file for MMC
(or &amp;quot;Powershell.exe.config&amp;quot; for cmdlets) and place it in the &lt;em&gt;%windir%\system32&lt;/em&gt; directory.&amp;#160;
Inside the .config file, just use the following xml:
&lt;/p&gt;
&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
&lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;configuration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;runtime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;      &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;assemblyBinding&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;urn:schemas-microsoft-com:asm.v1&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;       &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;dependentAssembly&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;assemblyIdentity&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Microsoft.WindowsAzure.StorageClient&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;                           &lt;span style="color: #ff0000"&gt;publicKeyToken&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;31bf3856ad364e35&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;                           &lt;span style="color: #ff0000"&gt;culture&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;neutral&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;bindingRedirect&lt;/span&gt; &lt;span style="color: #ff0000"&gt;oldVersion&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1.0.0.0&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;                          &lt;span style="color: #ff0000"&gt;newVersion&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1.1.0.0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;       &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;dependentAssembly&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;       &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;dependentAssembly&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;assemblyIdentity&lt;/span&gt; &lt;span style="color: #ff0000"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Microsoft.WindowsAzure.StorageClient&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;                           &lt;span style="color: #ff0000"&gt;publicKeyToken&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;31bf3856ad364e35&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;                           &lt;span style="color: #ff0000"&gt;culture&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;neutral&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;          &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;publisherPolicy&lt;/span&gt; &lt;span style="color: #ff0000"&gt;apply&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;no&amp;quot;
/&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;       &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;dependentAssembly&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&amp;#160;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;      &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;assemblyBinding&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;runtime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;configuration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=bde201b9-41f0-48b1-8a0e-b5f197ed4cb4" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,bde201b9-41f0-48b1-8a0e-b5f197ed4cb4.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=3a8f0bf1-a3be-471b-8c96-e7469c9d107d</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,3a8f0bf1-a3be-471b-8c96-e7469c9d107d.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,3a8f0bf1-a3be-471b-8c96-e7469c9d107d.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3a8f0bf1-a3be-471b-8c96-e7469c9d107d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I am back from TechEd EU (and PDC)!  It was a long and exciting last few weeks
getting first ready for PDC and then flying to Germany to deliver a couple sessions. 
It was a great, if not hectic experience for the last few weeks.  For PDC, I
had a part to play in the keynote demos as well as the PDC Workshop on the following
Saturday.  Those two things together took more time than I would care to admit. 
Once PDC was a wrap, I got to start building my talks for TechEd EU.
</p>
        <p>
You can find both of my talks on the <a href="http://www.msteched.com/Speakers/Ryan-Dunn">TechEd
Online Site</a> and embedded below.  The embedding doesn't work great on the
blog because of layout issues I need to fix, but RSS readers should have a better
time.
</p>
        <p>
Thanks to everyone who attended these sessions in person and all the nice comments. 
I have almost completely recovered my voice at this point - my cold last just the
duration of the trip of course!
</p>
        <p>
 
</p>
        <p>
 
</p>
        <object class="player" width="645" height="363" type="application/x-silverlight-2" data="data:application/x-silverlight-2,">
          <param value="http://www.msteched.com/ClientBin/players/VideoPlayer2009_03_27.xap" name="source" />
          <param value="m=http://ecn.channel9.msdn.com/o9/te/Europe/2010/wmv/cos324.wmv,thumbnail=http://www.msteched.com/Skins/TechEdOnline/Styles/images/DefaultPlayerBackground.png,autohide=true,showembed=true" name="initParams" />
          <param value="#00000000" name="background" />
          <param name="minRuntimeVersion" value="3.0.50106.0" />
          <param name="windowless" value="true" />
          <param name="enableGPUAcceleration" value="true" />
          <param name="autoUpgrade" value="true" />
          <a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=3.0.50106.0" style="text-decoration:none">
            <img src="http://www.msteched.com/Skins/TechEdOnline/Styles/images/NoSilverlight.jpg" alt="Get Microsoft Silverlight" style="border-style:none" />
          </a>
        </object>
        <br />
        <br />
        <object class="player" width="645" height="363" type="application/x-silverlight-2" data="data:application/x-silverlight-2,">
          <param value="http://www.msteched.com/ClientBin/players/VideoPlayer2009_03_27.xap" name="source" />
          <param value="m=http://ecn.channel9.msdn.com/o9/te/Europe/2010/wmv/cos325.wmv,thumbnail=http://www.msteched.com/Skins/TechEdOnline/Styles/images/DefaultPlayerBackground.png,autohide=true,showembed=true" name="initParams" />
          <param value="#00000000" name="background" />
          <param name="minRuntimeVersion" value="3.0.50106.0" />
          <param name="windowless" value="true" />
          <param name="enableGPUAcceleration" value="true" />
          <param name="autoUpgrade" value="true" />
          <a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=3.0.50106.0" style="text-decoration:none">
            <img src="http://www.msteched.com/Skins/TechEdOnline/Styles/images/NoSilverlight.jpg" alt="Get Microsoft Silverlight" style="border-style:none" />
          </a>
        </object>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=3a8f0bf1-a3be-471b-8c96-e7469c9d107d" />
      </body>
      <title>Back from PDC and TechEd Europe</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,3a8f0bf1-a3be-471b-8c96-e7469c9d107d.aspx</guid>
      <link>http://dunnry.com/blog/2010/11/16/BackFromPDCAndTechEdEurope.aspx</link>
      <pubDate>Tue, 16 Nov 2010 22:50:51 GMT</pubDate>
      <description>&lt;p&gt;
I am back from TechEd EU (and PDC)!&amp;#160; It was a long and exciting last few weeks
getting first ready for PDC and then flying to Germany to deliver a couple sessions.&amp;#160;
It was a great, if not hectic experience for the last few weeks.&amp;#160; For PDC, I
had a part to play in the keynote demos as well as the PDC Workshop on the following
Saturday.&amp;#160; Those two things together took more time than I would care to admit.&amp;#160;
Once PDC was a wrap, I got to start building my talks for TechEd EU.
&lt;/p&gt;
&lt;p&gt;
You can find both of my talks on the &lt;a href="http://www.msteched.com/Speakers/Ryan-Dunn"&gt;TechEd
Online Site&lt;/a&gt; and embedded below.&amp;#160; The embedding doesn't work great on the
blog because of layout issues I need to fix, but RSS readers should have a better
time.
&lt;/p&gt;
&lt;p&gt;
Thanks to everyone who attended these sessions in person and all the nice comments.&amp;#160;
I have almost completely recovered my voice at this point - my cold last just the
duration of the trip of course!
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;object class="player" width="645" height="363" type="application/x-silverlight-2" data="data:application/x-silverlight-2,"&gt;
&lt;param value="http://www.msteched.com/ClientBin/players/VideoPlayer2009_03_27.xap" name="source" /&gt;
&lt;param value="m=http://ecn.channel9.msdn.com/o9/te/Europe/2010/wmv/cos324.wmv,thumbnail=http://www.msteched.com/Skins/TechEdOnline/Styles/images/DefaultPlayerBackground.png,autohide=true,showembed=true" name="initParams" /&gt;
&lt;param value="#00000000" name="background" /&gt;
&lt;param name="minRuntimeVersion" value="3.0.50106.0" /&gt;
&lt;param name="windowless" value="true" /&gt;
&lt;param name="enableGPUAcceleration" value="true" /&gt;
&lt;param name="autoUpgrade" value="true" /&gt;
&lt;a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;amp;v=3.0.50106.0" style="text-decoration:none"&gt; &lt;img src="http://www.msteched.com/Skins/TechEdOnline/Styles/images/NoSilverlight.jpg" alt="Get Microsoft Silverlight" style="border-style:none" /&gt; &lt;/a&gt; 
&lt;/object&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;object class="player" width="645" height="363" type="application/x-silverlight-2" data="data:application/x-silverlight-2,"&gt;
&lt;param value="http://www.msteched.com/ClientBin/players/VideoPlayer2009_03_27.xap" name="source" /&gt;
&lt;param value="m=http://ecn.channel9.msdn.com/o9/te/Europe/2010/wmv/cos325.wmv,thumbnail=http://www.msteched.com/Skins/TechEdOnline/Styles/images/DefaultPlayerBackground.png,autohide=true,showembed=true" name="initParams" /&gt;
&lt;param value="#00000000" name="background" /&gt;
&lt;param name="minRuntimeVersion" value="3.0.50106.0" /&gt;
&lt;param name="windowless" value="true" /&gt;
&lt;param name="enableGPUAcceleration" value="true" /&gt;
&lt;param name="autoUpgrade" value="true" /&gt;
&lt;a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;amp;v=3.0.50106.0" style="text-decoration:none"&gt; &lt;img src="http://www.msteched.com/Skins/TechEdOnline/Styles/images/NoSilverlight.jpg" alt="Get Microsoft Silverlight" style="border-style:none" /&gt; &lt;/a&gt; 
&lt;/object&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=3a8f0bf1-a3be-471b-8c96-e7469c9d107d" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,3a8f0bf1-a3be-471b-8c96-e7469c9d107d.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=114c6e70-8b4e-48f2-9ef1-ce0d1ae46a04</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,114c6e70-8b4e-48f2-9ef1-ce0d1ae46a04.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,114c6e70-8b4e-48f2-9ef1-ce0d1ae46a04.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=114c6e70-8b4e-48f2-9ef1-ce0d1ae46a04</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
For the <a href="http://channel9.msdn.com/Shows/Cloud+Cover/Cloud-Cover-Episode-30-Coordinating-Work-and-Load-Testing">30th
Cloud Cover show</a>, <a href="http://blog.smarx.com/">Steve</a> and I talked about
coordinating work.  It is not an entirely new topic as there have been <a href="http://www.wadewegner.com/2010/05/release-the-hounds-multicasting-with-azure-appfabric/">a
couple variations</a> on the topic before.  However, the solution I coded is
actually different than both of those.  I chose to simply iterate through all
the available instances and fire a WCF message to each one.  I could have done
this is parallel or used multi-casting (probably more elegant), but for simplicity
sake: it just works.
</p>
        <p>
The reason I needed to coordinate work was in context of load testing a site. 
Someone had asked me about load testing in Windows Azure.  The cloud is a perfect
tool to use for load testing.   Where else can you get a lot of capacity
for a short period of time?  With that thought in mind, I searched around to
find a way to generate a lot of traffic quickly.
</p>
        <p>
I built a simple 2 role solution where a controller could send commands to a worker
and the worker in turn would spawn a load testing tool.  For this sample, I chose
a tool called <a href="http://httpd.apache.org/docs/2.0/programs/ab.html">ApacheBench</a>. 
You should watch the show to understand why I chose ApacheBench instead of the more
powerful <a href="http://www.iis.net/community/default.aspx?tabid=34&amp;g=6&amp;i=1467">WCAT</a>.
</p>
        <p>
          <a href="http://code.msdn.microsoft.com/sitehammer">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="hammerdance" border="0" alt="hammerdance" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Load-Testing-on-Windows-Azure_7B45/hammerdance_3.gif" width="56" height="82" />
          </a>
        </p>
        <p>
          <a href="http://code.msdn.microsoft.com/sitehammer">Get the source - It's Hammer Time!</a>
        </p>
        <p>
 
</p>
        <p>
PS: Big props go to Steve for AJAX'ing the source up side the head.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=114c6e70-8b4e-48f2-9ef1-ce0d1ae46a04" />
      </body>
      <title>Load Testing on Windows Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,114c6e70-8b4e-48f2-9ef1-ce0d1ae46a04.aspx</guid>
      <link>http://dunnry.com/blog/2010/10/15/LoadTestingOnWindowsAzure.aspx</link>
      <pubDate>Fri, 15 Oct 2010 16:06:03 GMT</pubDate>
      <description>&lt;p&gt;
For the &lt;a href="http://channel9.msdn.com/Shows/Cloud+Cover/Cloud-Cover-Episode-30-Coordinating-Work-and-Load-Testing"&gt;30th
Cloud Cover show&lt;/a&gt;, &lt;a href="http://blog.smarx.com/"&gt;Steve&lt;/a&gt; and I talked about
coordinating work.&amp;#160; It is not an entirely new topic as there have been &lt;a href="http://www.wadewegner.com/2010/05/release-the-hounds-multicasting-with-azure-appfabric/"&gt;a
couple variations&lt;/a&gt; on the topic before.&amp;#160; However, the solution I coded is
actually different than both of those.&amp;#160; I chose to simply iterate through all
the available instances and fire a WCF message to each one.&amp;#160; I could have done
this is parallel or used multi-casting (probably more elegant), but for simplicity
sake: it just works.
&lt;/p&gt;
&lt;p&gt;
The reason I needed to coordinate work was in context of load testing a site.&amp;#160;
Someone had asked me about load testing in Windows Azure.&amp;#160; The cloud is a perfect
tool to use for load testing.&amp;#160;&amp;#160; Where else can you get a lot of capacity
for a short period of time?&amp;#160; With that thought in mind, I searched around to
find a way to generate a lot of traffic quickly.
&lt;/p&gt;
&lt;p&gt;
I built a simple 2 role solution where a controller could send commands to a worker
and the worker in turn would spawn a load testing tool.&amp;#160; For this sample, I chose
a tool called &lt;a href="http://httpd.apache.org/docs/2.0/programs/ab.html"&gt;ApacheBench&lt;/a&gt;.&amp;#160;
You should watch the show to understand why I chose ApacheBench instead of the more
powerful &lt;a href="http://www.iis.net/community/default.aspx?tabid=34&amp;amp;g=6&amp;amp;i=1467"&gt;WCAT&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://code.msdn.microsoft.com/sitehammer"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="hammerdance" border="0" alt="hammerdance" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/Load-Testing-on-Windows-Azure_7B45/hammerdance_3.gif" width="56" height="82" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://code.msdn.microsoft.com/sitehammer"&gt;Get the source - It's Hammer Time!&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
PS: Big props go to Steve for AJAX'ing the source up side the head.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=114c6e70-8b4e-48f2-9ef1-ce0d1ae46a04" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,114c6e70-8b4e-48f2-9ef1-ce0d1ae46a04.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=456fbcde-6aca-4213-a2a0-1e47ae0963ef</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,456fbcde-6aca-4213-a2a0-1e47ae0963ef.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,456fbcde-6aca-4213-a2a0-1e47ae0963ef.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=456fbcde-6aca-4213-a2a0-1e47ae0963ef</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have been meaning to update my blog for some time with the routing solution I presented
in <a href="http://channel9.msdn.com/Shows/Cloud+Cover/Cloud-Cover-Episode-24-Routing-in-Windows-Azure">Cloud
Cover 24</a>.  One failed laptop harddrive later and well. I lost my original
post and didn't get around until now to try to replace it.  Anyhow, enough of
my sad story.
</p>
        <p>
One of the many great benefits of using Windows Azure is that networking is taken
care of for you.  You get connected to a load balancer for all your input endpoints
and we automatically round-robin the requests to all your instances that are declared
to be part of the role.  Visually, it is pretty easy to see:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/c61fbcaf2a02_C908/image_2.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/c61fbcaf2a02_C908/image_thumb.png" width="500" height="421" />
          </a>
        </p>
        <p>
However, this introduces a slight issue common to all webfarm scenarios:  state
doesn't work very well.  If your service likes to rely on the fact that it will
communicate with exactly the same machine as last time, you are in trouble. 
In fact, this is why you will always hear an overarching theme of designing to be
stateless in the cloud (or any scale-out architecture).
</p>
        <p>
There are inevitably scenarios where sticky sessions (routing when possible to the
same instance) will benefit a given architecture.  We talked a lot about this
on the show.  In order to produce sticky sessions in Windows Azure, you need
a mechanism to route to a given instance.  For the show, I talked about how to
do this with a simple socket listener.
</p>
        <p>
 
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/c61fbcaf2a02_C908/image_4.png">
            <img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/c61fbcaf2a02_C908/image_thumb_1.png" width="500" height="333" />
          </a>
        </p>
        <p>
We introduce a router between the Load Balancer and the Web Roles in this scenario. 
The router will peek (1) the incoming headers to determine via cookies or other logic
where to route the request.  It then forwards the traffic over sockets to the
appropriate server (2).  For all return responses, the router will optionally
peek that stream as well to determine whether to inject the cookie (3).  Finally,
if necessary, the router will inject a cookie that states where the user should be
routed to in subsequent requests (4).
</p>
        <p>
I should note that during the show we talked about how this cookie injection could
work, but the demo did not use it.  For this post, I went ahead and updated the
code to actually perform the cookie injection.  This allows me to have a stateless
router as well.  In the demo on the show, I had a router that simply used a dictionary
lookup of SessionIDs to Endpoints.  However, we pointed out that this was problematic
without externalizing that state somewhere.  A simple solution is to have the
client deliver to the router via a cookie where it was last connected.  This
way the state is carried on each request and is no longer the router's responsibility.
</p>
        <p>
You can <a href="http://code.msdn.microsoft.com/stickyrouter">download the code for
this from Code Gallery</a>.  Please bear in mind that this was only lightly tested
and I make no guarantees about production worthiness.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=456fbcde-6aca-4213-a2a0-1e47ae0963ef" />
      </body>
      <title>Sticky HTTP Session Routing in Windows Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,456fbcde-6aca-4213-a2a0-1e47ae0963ef.aspx</guid>
      <link>http://dunnry.com/blog/2010/10/14/StickyHTTPSessionRoutingInWindowsAzure.aspx</link>
      <pubDate>Thu, 14 Oct 2010 21:56:51 GMT</pubDate>
      <description>&lt;p&gt;
I have been meaning to update my blog for some time with the routing solution I presented
in &lt;a href="http://channel9.msdn.com/Shows/Cloud+Cover/Cloud-Cover-Episode-24-Routing-in-Windows-Azure"&gt;Cloud
Cover 24&lt;/a&gt;.&amp;#160; One failed laptop harddrive later and well. I lost my original
post and didn't get around until now to try to replace it.&amp;#160; Anyhow, enough of
my sad story.
&lt;/p&gt;
&lt;p&gt;
One of the many great benefits of using Windows Azure is that networking is taken
care of for you.&amp;#160; You get connected to a load balancer for all your input endpoints
and we automatically round-robin the requests to all your instances that are declared
to be part of the role.&amp;#160; Visually, it is pretty easy to see:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/c61fbcaf2a02_C908/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/c61fbcaf2a02_C908/image_thumb.png" width="500" height="421" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
However, this introduces a slight issue common to all webfarm scenarios:&amp;#160; state
doesn't work very well.&amp;#160; If your service likes to rely on the fact that it will
communicate with exactly the same machine as last time, you are in trouble.&amp;#160;
In fact, this is why you will always hear an overarching theme of designing to be
stateless in the cloud (or any scale-out architecture).
&lt;/p&gt;
&lt;p&gt;
There are inevitably scenarios where sticky sessions (routing when possible to the
same instance) will benefit a given architecture.&amp;#160; We talked a lot about this
on the show.&amp;#160; In order to produce sticky sessions in Windows Azure, you need
a mechanism to route to a given instance.&amp;#160; For the show, I talked about how to
do this with a simple socket listener.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/Windows-Live-Writer/c61fbcaf2a02_C908/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/Windows-Live-Writer/c61fbcaf2a02_C908/image_thumb_1.png" width="500" height="333" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
We introduce a router between the Load Balancer and the Web Roles in this scenario.&amp;#160;
The router will peek (1) the incoming headers to determine via cookies or other logic
where to route the request.&amp;#160; It then forwards the traffic over sockets to the
appropriate server (2).&amp;#160; For all return responses, the router will optionally
peek that stream as well to determine whether to inject the cookie (3).&amp;#160; Finally,
if necessary, the router will inject a cookie that states where the user should be
routed to in subsequent requests (4).
&lt;/p&gt;
&lt;p&gt;
I should note that during the show we talked about how this cookie injection could
work, but the demo did not use it.&amp;#160; For this post, I went ahead and updated the
code to actually perform the cookie injection.&amp;#160; This allows me to have a stateless
router as well.&amp;#160; In the demo on the show, I had a router that simply used a dictionary
lookup of SessionIDs to Endpoints.&amp;#160; However, we pointed out that this was problematic
without externalizing that state somewhere.&amp;#160; A simple solution is to have the
client deliver to the router via a cookie where it was last connected.&amp;#160; This
way the state is carried on each request and is no longer the router's responsibility.
&lt;/p&gt;
&lt;p&gt;
You can &lt;a href="http://code.msdn.microsoft.com/stickyrouter"&gt;download the code for
this from Code Gallery&lt;/a&gt;.&amp;#160; Please bear in mind that this was only lightly tested
and I make no guarantees about production worthiness.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=456fbcde-6aca-4213-a2a0-1e47ae0963ef" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,456fbcde-6aca-4213-a2a0-1e47ae0963ef.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=cf64921b-4fac-45d3-ab16-7cfe225e59ae</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,cf64921b-4fac-45d3-ab16-7cfe225e59ae.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,cf64921b-4fac-45d3-ab16-7cfe225e59ae.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=cf64921b-4fac-45d3-ab16-7cfe225e59ae</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
For <a href="http://channel9.msdn.com/shows/Cloud+Cover/Cloud-Cover-Episode-19-Silverlight-and-Blob-Storage/" target="_blank">Episode
19</a> of the <a href="http://channel9.msdn.com/shows/Cloud+Cover/" target="_blank">Cloud
Cover</a> show, <a href="http://blog.smarx.com/" target="_blank">Steve</a> and I discussed
the importance of setting the Content-Type on your blobs in Windows Azure blob storage. 
This was was especially important for Silverlight clients.  I mentioned that
there was a way to look up a Content Type from your registry as opposed to hardcoding
a list.  The code is actually pretty simple.  I pulled this from some code
I had lying around that does uploads.  
</p>
        <p>
Here it is:
</p>
        <pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">private</span>
            <span style="color: #0000ff">static</span>
            <span style="color: #0000ff">string</span> GetContentType(<span style="color: #0000ff">string</span> file) </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">string</span> contentType
= "<span style="color: #8b0000">application/octet-stream</span>"; </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">string</span> fileExt
= System.IO.Path.GetExtension(file).ToLowerInvariant(); </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">	RegistryKey fileExtKey = Registry.ClassesRoot.OpenSubKey(fileExt);
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">if</span> (fileExtKey
!= <span style="color: #0000ff">null</span> &amp;&amp; fileExtKey.GetValue("<span style="color: #8b0000">Content
Type</span>") != <span style="color: #0000ff">null</span>) </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">	{
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">		contentType = fileExtKey.GetValue("<span style="color: #8b0000">Content
Type</span>").ToString(); </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">	}
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">return</span> contentType; </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">}
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
        </pre>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=cf64921b-4fac-45d3-ab16-7cfe225e59ae" />
      </body>
      <title>Getting the Content-Type from your Registry</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,cf64921b-4fac-45d3-ab16-7cfe225e59ae.aspx</guid>
      <link>http://dunnry.com/blog/2010/07/16/GettingTheContentTypeFromYourRegistry.aspx</link>
      <pubDate>Fri, 16 Jul 2010 14:40:13 GMT</pubDate>
      <description>&lt;p&gt;
For &lt;a href="http://channel9.msdn.com/shows/Cloud+Cover/Cloud-Cover-Episode-19-Silverlight-and-Blob-Storage/" target="_blank"&gt;Episode
19&lt;/a&gt; of the &lt;a href="http://channel9.msdn.com/shows/Cloud+Cover/" target="_blank"&gt;Cloud
Cover&lt;/a&gt; show, &lt;a href="http://blog.smarx.com/" target="_blank"&gt;Steve&lt;/a&gt; and I discussed
the importance of setting the Content-Type on your blobs in Windows Azure blob storage.&amp;#160;
This was was especially important for Silverlight clients.&amp;#160; I mentioned that
there was a way to look up a Content Type from your registry as opposed to hardcoding
a list.&amp;#160; The code is actually pretty simple.&amp;#160; I pulled this from some code
I had lying around that does uploads.&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
Here it is:
&lt;/p&gt;
&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; GetContentType(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; file) &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;{
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;	&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; contentType
= &amp;quot;&lt;span style="color: #8b0000"&gt;application/octet-stream&lt;/span&gt;&amp;quot;; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;	&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; fileExt
= System.IO.Path.GetExtension(file).ToLowerInvariant(); &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;	RegistryKey fileExtKey = Registry.ClassesRoot.OpenSubKey(fileExt);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;	&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (fileExtKey
!= &lt;span style="color: #0000ff"&gt;null&lt;/span&gt; &amp;amp;&amp;amp; fileExtKey.GetValue(&amp;quot;&lt;span style="color: #8b0000"&gt;Content
Type&lt;/span&gt;&amp;quot;) != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;	{
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;		contentType = fileExtKey.GetValue(&amp;quot;&lt;span style="color: #8b0000"&gt;Content
Type&lt;/span&gt;&amp;quot;).ToString(); &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;	}
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;	&lt;span style="color: #0000ff"&gt;return&lt;/span&gt; contentType; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;}
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=cf64921b-4fac-45d3-ab16-7cfe225e59ae" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,cf64921b-4fac-45d3-ab16-7cfe225e59ae.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=dddae159-7691-431a-b9d3-eaf10f66f30d</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,dddae159-7691-431a-b9d3-eaf10f66f30d.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,dddae159-7691-431a-b9d3-eaf10f66f30d.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=dddae159-7691-431a-b9d3-eaf10f66f30d</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I remember when I was in consulting some years ago now.  At the time, I was a
fairly senior technical resource and I had a pretty wide variety of clients and scenarios
under my belt.  I was... experienced.
</p>
        <p>
Anyhow, as a consultant it is pretty common to be interviewed by your potential client
before arriving.  Clients don't like to have total n00bs on the job if they are
paying consulting rates.  I used to have a number of these sort of interviews
before being accepted to work on a project.
</p>
        <p>
Even though I forget exactly now which client it was that interviewed me, I still
remember the interview.  At the time, .NET 1.1 was the norm and 2.0 was in beta
or so.  I was interviewing for a technical position on corporate account - architect
or senior dev, if I recall correctly.  The customer got me on a conference call
and I breezed through the background portion of the interview.  Next came the
'technical' interview.  I apparently got some young buck, fresh from his MSCD.NET
exam that decided to test me on .NET trivia.  After answering a number of general
.NET questions correctly, he asked me two questions that stick in my mind:
</p>
        <ul>
          <li>
What does 'private internal' mean?</li>
          <li>
If you were to throw a custom exception in .NET, how would you do it?</li>
        </ul>
        <p>
Now, I said at the time that I wasn't sure on the first one and that I thought it
might be both private and internal visibility.  The interviewer delighted in
telling me it was private OR internal (the UNION of the two).  For the next question,
I said I would simply derive from Exception and do what I needed.  The interviewer
again (with 'Aha!' in his voice) told me that (of course) I should derive from ApplicationException.
</p>
        <p>
I was passed over for the role for not being technical enough.
</p>
        <p>
Now, in retrospect, it is laughable.  First, you only need to be told once what
something means in order for it to stick.  Next, it turns out <a href="http://blogs.msdn.com/b/kcwalina/archive/2006/06/23/644822.aspx" target="_blank">I
was right</a> on the second one.  The interviewer was so caught up on catching
me on what I didn't know that he never considered if it mattered.  To this day,
I have never seen a single instance of using "private internal" on anything
- ever.  Furthermore, he ignored the fact that I had a vast amount of experience
in his industry and had demonstrated enough .NET knowledge to determine I wasn't joking
when I said I had coded in it.
</p>
        <p>
It would have been much better to ask meaningful questions that actually test what
matters (in this case systems thinking):
</p>
        <ul>
          <li>
When and why would you use a private and internal visible declaration - a.k.a. 'private
internal'?</li>
          <li>
Why would you throw a custom exception in .NET?  When do you throw exceptions?</li>
        </ul>
        <p>
Those kinds of questions get much deeper into the psyche of the developer and let
you understand what kind of developer you are dealing with.
</p>
        <p>
I contrast this with my Microsoft interview.  I had one of the most intimidating
interviews ever with <a href="http://blogs.msdn.com/b/vbertocci/" target="_blank">Vittorio</a>. 
He asked me (paraphrasing), "How would you design Twitter?  Take some time
and think about it - trivial answers without consideration will not bode well for
you".  It was beautiful in hindsight.  I got to tell him about the
architectural considerations that I thought mattered and in broad strokes what I thought
about.  It must have worked - we are now on the same team and he is a good colleague
and friend.  Had he asked me about advanced threading or WCF bindings, I might
not have 'passed' his exam.  Turns out that those topics don't matter for the
job.  He asked exactly what did matter - could I think about systems as a whole
and I did I have enough understanding of the pieces?
</p>
        <p>
Next time you interview someone, make sure you measure what matters.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=dddae159-7691-431a-b9d3-eaf10f66f30d" />
      </body>
      <title>Measure What Matters</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,dddae159-7691-431a-b9d3-eaf10f66f30d.aspx</guid>
      <link>http://dunnry.com/blog/2010/07/09/MeasureWhatMatters.aspx</link>
      <pubDate>Fri, 09 Jul 2010 06:25:43 GMT</pubDate>
      <description>&lt;p&gt;
I remember when I was in consulting some years ago now.&amp;#160; At the time, I was a
fairly senior technical resource and I had a pretty wide variety of clients and scenarios
under my belt.&amp;#160; I was... experienced.
&lt;/p&gt;
&lt;p&gt;
Anyhow, as a consultant it is pretty common to be interviewed by your potential client
before arriving.&amp;#160; Clients don't like to have total n00bs on the job if they are
paying consulting rates.&amp;#160; I used to have a number of these sort of interviews
before being accepted to work on a project.
&lt;/p&gt;
&lt;p&gt;
Even though I forget exactly now which client it was that interviewed me, I still
remember the interview.&amp;#160; At the time, .NET 1.1 was the norm and 2.0 was in beta
or so.&amp;#160; I was interviewing for a technical position on corporate account - architect
or senior dev, if I recall correctly.&amp;#160; The customer got me on a conference call
and I breezed through the background portion of the interview.&amp;#160; Next came the
'technical' interview.&amp;#160; I apparently got some young buck, fresh from his MSCD.NET
exam that decided to test me on .NET trivia.&amp;#160; After answering a number of general
.NET questions correctly, he asked me two questions that stick in my mind:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
What does 'private internal' mean?&lt;/li&gt;
&lt;li&gt;
If you were to throw a custom exception in .NET, how would you do it?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Now, I said at the time that I wasn't sure on the first one and that I thought it
might be both private and internal visibility.&amp;#160; The interviewer delighted in
telling me it was private OR internal (the UNION of the two).&amp;#160; For the next question,
I said I would simply derive from Exception and do what I needed.&amp;#160; The interviewer
again (with 'Aha!' in his voice) told me that (of course) I should derive from ApplicationException.
&lt;/p&gt;
&lt;p&gt;
I was passed over for the role for not being technical enough.
&lt;/p&gt;
&lt;p&gt;
Now, in retrospect, it is laughable.&amp;#160; First, you only need to be told once what
something means in order for it to stick.&amp;#160; Next, it turns out &lt;a href="http://blogs.msdn.com/b/kcwalina/archive/2006/06/23/644822.aspx" target="_blank"&gt;I
was right&lt;/a&gt; on the second one.&amp;#160; The interviewer was so caught up on catching
me on what I didn't know that he never considered if it mattered.&amp;#160; To this day,
I have never seen a single instance of using &amp;quot;private internal&amp;quot; on anything
- ever.&amp;#160; Furthermore, he ignored the fact that I had a vast amount of experience
in his industry and had demonstrated enough .NET knowledge to determine I wasn't joking
when I said I had coded in it.
&lt;/p&gt;
&lt;p&gt;
It would have been much better to ask meaningful questions that actually test what
matters (in this case systems thinking):
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
When and why would you use a private and internal visible declaration - a.k.a. 'private
internal'?&lt;/li&gt;
&lt;li&gt;
Why would you throw a custom exception in .NET?&amp;#160; When do you throw exceptions?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Those kinds of questions get much deeper into the psyche of the developer and let
you understand what kind of developer you are dealing with.
&lt;/p&gt;
&lt;p&gt;
I contrast this with my Microsoft interview.&amp;#160; I had one of the most intimidating
interviews ever with &lt;a href="http://blogs.msdn.com/b/vbertocci/" target="_blank"&gt;Vittorio&lt;/a&gt;.&amp;#160;
He asked me (paraphrasing), &amp;quot;How would you design Twitter?&amp;#160; Take some time
and think about it - trivial answers without consideration will not bode well for
you&amp;quot;.&amp;#160; It was beautiful in hindsight.&amp;#160; I got to tell him about the
architectural considerations that I thought mattered and in broad strokes what I thought
about.&amp;#160; It must have worked - we are now on the same team and he is a good colleague
and friend.&amp;#160; Had he asked me about advanced threading or WCF bindings, I might
not have 'passed' his exam.&amp;#160; Turns out that those topics don't matter for the
job.&amp;#160; He asked exactly what did matter - could I think about systems as a whole
and I did I have enough understanding of the pieces?
&lt;/p&gt;
&lt;p&gt;
Next time you interview someone, make sure you measure what matters.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=dddae159-7691-431a-b9d3-eaf10f66f30d" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,dddae159-7691-431a-b9d3-eaf10f66f30d.aspx</comments>
      <category>Tips</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=b62d3d48-eed9-407a-9097-35b230e7271e</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,b62d3d48-eed9-407a-9097-35b230e7271e.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,b62d3d48-eed9-407a-9097-35b230e7271e.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b62d3d48-eed9-407a-9097-35b230e7271e</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Last week, I had the opportunity to talk with Hal and Jonathan on the <a href="http://powerscripting.wordpress.com/">PowerScripting
podcast</a> about Windows Azure.  It was a fun chat - lots on Windows Azure,
a bit on the <a href="http://code.msdn.microsoft.com/azurecmdlets">WASM cmdlets</a> and <a href="http://code.msdn.microsoft.com/windowsazuremmc">MMC</a>,
and it revealed my <a href="http://en.wikipedia.org/wiki/Spider-Man">favorite comic
book character</a>.
</p>
        <p>
          <a href="http://powerscripting.wordpress.com/2010/06/06/episode-114-ryan-dunn-on-azure-and-powershell/">Listen
to it now.</a>
        </p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=b62d3d48-eed9-407a-9097-35b230e7271e" />
      </body>
      <title>PowerScripting Podcast</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,b62d3d48-eed9-407a-9097-35b230e7271e.aspx</guid>
      <link>http://dunnry.com/blog/2010/06/11/PowerScriptingPodcast.aspx</link>
      <pubDate>Fri, 11 Jun 2010 18:41:44 GMT</pubDate>
      <description>&lt;p&gt;
Last week, I had the opportunity to talk with Hal and Jonathan on the &lt;a href="http://powerscripting.wordpress.com/"&gt;PowerScripting
podcast&lt;/a&gt; about Windows Azure.&amp;#160; It was a fun chat - lots on Windows Azure,
a bit on the &lt;a href="http://code.msdn.microsoft.com/azurecmdlets"&gt;WASM cmdlets&lt;/a&gt; and &lt;a href="http://code.msdn.microsoft.com/windowsazuremmc"&gt;MMC&lt;/a&gt;,
and it revealed my &lt;a href="http://en.wikipedia.org/wiki/Spider-Man"&gt;favorite comic
book character&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://powerscripting.wordpress.com/2010/06/06/episode-114-ryan-dunn-on-azure-and-powershell/"&gt;Listen
to it now.&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=b62d3d48-eed9-407a-9097-35b230e7271e" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,b62d3d48-eed9-407a-9097-35b230e7271e.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>PowerShell</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=e9f56683-03b1-415a-8d3f-a9bd51e57238</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,e9f56683-03b1-415a-8d3f-a9bd51e57238.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,e9f56683-03b1-415a-8d3f-a9bd51e57238.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=e9f56683-03b1-415a-8d3f-a9bd51e57238</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This post is a bit overdue:  <a href="http://blog.smarx.com" target="_blank">Steve</a> threatened
to blog it himself, so I figured I should get moving.  In one of our <a href="http://channel9.msdn.com/shows/Cloud+Cover/" target="_blank">Cloud
Cover</a> episodes, we covered how to host <a href="http://channel9.msdn.com/shows/Cloud+Cover/Cloud-Cover-Episode-12-Hosting-WCF-and-Inter-role-Communication/" target="_blank">WCF
services in Windows Azure</a>.  I showed how to host both publically accessible
ones as well as how to host internal WCF services that are only visible within a hosted
service.
</p>
        <p>
In order to host an internal WCF Service, you need to setup an internal endpoint and
use inter-role communication.  The difference between doing this and hosting
an external WCF service on an input endpoint is mainly in the fact that internal endpoints
are not load-balanced, while input endpoints are hooked to the load-balancer.
</p>
        <h3>Hosting an Internal WCF Service
</h3>
        <p>
Here you can see how simple it is to actually get the internal WCF service up and
listening.  Notice that the only thing that is different is that the base address
I pass to my <strong>ServiceHost</strong> contains the internal endpoint I created. 
Since the port and IP address I am running on is not known until runtime, you have
to create the host and pass this information in dynamically.
</p>
        <pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">public</span>
            <span style="color: #0000ff">override</span>
            <span style="color: #0000ff">bool</span> OnStart() </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #008000">//
Set the maximum number of concurrent connections </span>
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    ServicePointManager.DefaultConnectionLimit = 12;
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    DiagnosticMonitor.Start("<span style="color: #8b0000">DiagnosticsConnectionString</span>"); </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #008000">//
For information on handling configuration changes</span>
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #008000">//
see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.</span>
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    RoleEnvironment.Changing += RoleEnvironmentChanging;
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    StartWCFService();
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">return</span>
            <span style="color: #0000ff">base</span>.OnStart(); </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">}
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">private</span>
            <span style="color: #0000ff">void</span> StartWCFService() </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    var baseAddress = String.Format(
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">        "<span style="color: #8b0000">net.tcp://{0}</span>", </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">        RoleEnvironment.CurrentRoleInstance.InstanceEndpoints["<span style="color: #8b0000">EchoService</span>"].IPEndpoint </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">        );
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    var host = <span style="color: #0000ff">new</span> ServiceHost(<span style="color: #0000ff">typeof</span>(EchoService), <span style="color: #0000ff">new</span> Uri(baseAddress)); </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    host.AddServiceEndpoint(<span style="color: #0000ff">typeof</span>(IEchoService), <span style="color: #0000ff">new</span> NetTcpBinding(SecurityMode.None),
"<span style="color: #8b0000">echo</span>"); </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    host.Open();
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">}</pre>
        </pre>
        <h3>Consuming the Internal WCF Service
</h3>
        <p>
From another role in my hosted service, I want to actually consume this service. 
From my code-behind, this was all the code I needed to actually call the service.
</p>
        <pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px">
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">protected</span>
            <span style="color: #0000ff">void</span> Button1_Click(<span style="color: #0000ff">object</span> sender,
EventArgs e) </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    var factory = <span style="color: #0000ff">new</span> ChannelFactory&lt;WorkerHost.IEchoService&gt;(<span style="color: #0000ff">new</span> NetTcpBinding(SecurityMode.None)); </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    var channel = factory.CreateChannel(GetRandomEndpoint());
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    Label1.Text = channel.Echo(TextBox1.Text);
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">}
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">private</span> EndpointAddress
GetRandomEndpoint() </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">{
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    var endpoints = RoleEnvironment.Roles["<span style="color: #8b0000">WorkerHost</span>"].Instances </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">        .Select(i =&gt; i.InstanceEndpoints["<span style="color: #8b0000">EchoService</span>"]) </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">        .ToArray();
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">    var r = <span style="color: #0000ff">new</span> Random(DateTime.Now.Millisecond); </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
          </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">
            <span style="color: #0000ff">return</span>
            <span style="color: #0000ff">new</span> EndpointAddress( </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">        String.Format(
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">            "<span style="color: #8b0000">net.tcp://{0}/echo</span>", </pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">            endpoints[r.Next(endpoints.Count() - 1)].IPEndpoint)
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">            );
</pre>
          <pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 12px">}</pre>
        </pre>
        <p>
The only bit of magic here was querying the fabric to determine all the endpoints
in the <strong>WorkerHost</strong> role that implemented the <strong>EchoService</strong> endpoint
and routing a request to one of them randomly.  You don't have to route requests
randomly per se, but I did this because internal endpoints are not load-balanced. 
I wanted to distribute the load evenly over each of my <strong>WorkerHost</strong> instances.
</p>
        <p>
One tip that I found out is that there is no need to cache the <strong>IPEndpoint</strong> information
you find.  It is already cached in the API call.  However, you may want
to cache your <strong>ChannelFactory</strong> according to <a href="http://blogs.msdn.com/b/wenlong/archive/2007/10/27/performance-improvement-of-wcf-client-proxy-creation-and-best-practices.aspx" target="_blank">best
practices</a> (unlike me).
</p>
        <h3>Hosting Public WCF Services
</h3>
        <p>
This is all pretty easy as well.  The only trick to this is that you need to
apply a new behavior that knows how to deal with the load balancer for proper MEX
endpoint generation.  Additionally, you need to include a class attribute on
your service to deal with an address filter mismatch issue.  This is pretty well
documented along with links to download the QFE that contains the behavior patch out
on the <a href="http://code.msdn.microsoft.com/wcfazure" target="_blank">WCF Azure
Samples</a> project on Code Gallery in <a href="http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues&amp;referringTitle=Home" target="_blank">Known
Issues</a>. <a href="http://blogs.msdn.com/jnak" target="_blank">Jim Nakashima</a> actually <a href="http://blogs.msdn.com/b/jnak/archive/2010/05/27/wcf-on-windows-azure.aspx" target="_blank">posted
about this</a> the other day as well in detail on his blog as well, so I won't dig
into this again here.
</p>
        <p>
Lastly, if you just want the code from the show, <a href="http://cid-4225352e17899c6d.office.live.com/self.aspx/Public/CloudWCF.zip" target="_blank">have
at it</a>!
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=e9f56683-03b1-415a-8d3f-a9bd51e57238" />
      </body>
      <title>Hosting WCF in Windows Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,e9f56683-03b1-415a-8d3f-a9bd51e57238.aspx</guid>
      <link>http://dunnry.com/blog/2010/05/28/HostingWCFInWindowsAzure.aspx</link>
      <pubDate>Fri, 28 May 2010 19:27:03 GMT</pubDate>
      <description>&lt;p&gt;
This post is a bit overdue:&amp;#160; &lt;a href="http://blog.smarx.com" target="_blank"&gt;Steve&lt;/a&gt; threatened
to blog it himself, so I figured I should get moving.&amp;#160; In one of our &lt;a href="http://channel9.msdn.com/shows/Cloud+Cover/" target="_blank"&gt;Cloud
Cover&lt;/a&gt; episodes, we covered how to host &lt;a href="http://channel9.msdn.com/shows/Cloud+Cover/Cloud-Cover-Episode-12-Hosting-WCF-and-Inter-role-Communication/" target="_blank"&gt;WCF
services in Windows Azure&lt;/a&gt;.&amp;#160; I showed how to host both publically accessible
ones as well as how to host internal WCF services that are only visible within a hosted
service.
&lt;/p&gt;
&lt;p&gt;
In order to host an internal WCF Service, you need to setup an internal endpoint and
use inter-role communication.&amp;#160; The difference between doing this and hosting
an external WCF service on an input endpoint is mainly in the fact that internal endpoints
are not load-balanced, while input endpoints are hooked to the load-balancer.
&lt;/p&gt;
&lt;h3&gt;Hosting an Internal WCF Service
&lt;/h3&gt;
&lt;p&gt;
Here you can see how simple it is to actually get the internal WCF service up and
listening.&amp;#160; Notice that the only thing that is different is that the base address
I pass to my &lt;strong&gt;ServiceHost&lt;/strong&gt; contains the internal endpoint I created.&amp;#160;
Since the port and IP address I am running on is not known until runtime, you have
to create the host and pass this information in dynamically.
&lt;/p&gt;
&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; OnStart() &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;{
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;//
Set the maximum number of concurrent connections &lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    ServicePointManager.DefaultConnectionLimit = 12;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    DiagnosticMonitor.Start(&amp;quot;&lt;span style="color: #8b0000"&gt;DiagnosticsConnectionString&lt;/span&gt;&amp;quot;); &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;//
For information on handling configuration changes&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #008000"&gt;//
see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.&lt;/span&gt; &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    RoleEnvironment.Changing += RoleEnvironmentChanging;
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    StartWCFService();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;.OnStart(); &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;}
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; StartWCFService() &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;{
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    var baseAddress = String.Format(
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        &amp;quot;&lt;span style="color: #8b0000"&gt;net.tcp://{0}&lt;/span&gt;&amp;quot;, &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        RoleEnvironment.CurrentRoleInstance.InstanceEndpoints[&amp;quot;&lt;span style="color: #8b0000"&gt;EchoService&lt;/span&gt;&amp;quot;].IPEndpoint &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        );
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    var host = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ServiceHost(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(EchoService), &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Uri(baseAddress)); &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    host.AddServiceEndpoint(&lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(IEchoService), &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NetTcpBinding(SecurityMode.None),
&amp;quot;&lt;span style="color: #8b0000"&gt;echo&lt;/span&gt;&amp;quot;); &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    host.Open();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;}&lt;/pre&gt;&lt;/pre&gt;
&lt;h3&gt;Consuming the Internal WCF Service
&lt;/h3&gt;
&lt;p&gt;
From another role in my hosted service, I want to actually consume this service.&amp;#160;
From my code-behind, this was all the code I needed to actually call the service.
&lt;/p&gt;
&lt;pre style="border-bottom: #cecece 1px solid; border-left: #cecece 1px solid; padding-bottom: 5px; background-color: #fbfbfb; min-height: 40px; padding-left: 5px; width: 500px; padding-right: 5px; overflow: auto; border-top: #cecece 1px solid; border-right: #cecece 1px solid; padding-top: 5px"&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Button1_Click(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender,
EventArgs e) &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;{
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    var factory = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ChannelFactory&amp;lt;WorkerHost.IEchoService&amp;gt;(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; NetTcpBinding(SecurityMode.None)); &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    var channel = factory.CreateChannel(GetRandomEndpoint());
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    Label1.Text = channel.Echo(TextBox1.Text);
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;}
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;span style="color: #0000ff"&gt;private&lt;/span&gt; EndpointAddress
GetRandomEndpoint() &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;{
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    var endpoints = RoleEnvironment.Roles[&amp;quot;&lt;span style="color: #8b0000"&gt;WorkerHost&lt;/span&gt;&amp;quot;].Instances &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        .Select(i =&amp;gt; i.InstanceEndpoints[&amp;quot;&lt;span style="color: #8b0000"&gt;EchoService&lt;/span&gt;&amp;quot;]) &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        .ToArray();
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    var r = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Random(DateTime.Now.Millisecond); &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;    &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; EndpointAddress( &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;        String.Format(
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            &amp;quot;&lt;span style="color: #8b0000"&gt;net.tcp://{0}/echo&lt;/span&gt;&amp;quot;, &lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            endpoints[r.Next(endpoints.Count() - 1)].IPEndpoint)
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;            );
&lt;/pre&gt;&lt;pre style="background-color: #fbfbfb; margin: 0em; width: 100%; font-family: consolas,&amp;#39;Courier New&amp;#39;,courier,monospace; font-size: 12px"&gt;}&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;
The only bit of magic here was querying the fabric to determine all the endpoints
in the &lt;strong&gt;WorkerHost&lt;/strong&gt; role that implemented the &lt;strong&gt;EchoService&lt;/strong&gt; endpoint
and routing a request to one of them randomly.&amp;#160; You don't have to route requests
randomly per se, but I did this because internal endpoints are not load-balanced.&amp;#160;
I wanted to distribute the load evenly over each of my &lt;strong&gt;WorkerHost&lt;/strong&gt; instances.
&lt;/p&gt;
&lt;p&gt;
One tip that I found out is that there is no need to cache the &lt;strong&gt;IPEndpoint&lt;/strong&gt; information
you find.&amp;#160; It is already cached in the API call.&amp;#160; However, you may want
to cache your &lt;strong&gt;ChannelFactory&lt;/strong&gt; according to &lt;a href="http://blogs.msdn.com/b/wenlong/archive/2007/10/27/performance-improvement-of-wcf-client-proxy-creation-and-best-practices.aspx" target="_blank"&gt;best
practices&lt;/a&gt; (unlike me).
&lt;/p&gt;
&lt;h3&gt;Hosting Public WCF Services
&lt;/h3&gt;
&lt;p&gt;
This is all pretty easy as well.&amp;#160; The only trick to this is that you need to
apply a new behavior that knows how to deal with the load balancer for proper MEX
endpoint generation.&amp;#160; Additionally, you need to include a class attribute on
your service to deal with an address filter mismatch issue.&amp;#160; This is pretty well
documented along with links to download the QFE that contains the behavior patch out
on the &lt;a href="http://code.msdn.microsoft.com/wcfazure" target="_blank"&gt;WCF Azure
Samples&lt;/a&gt; project on Code Gallery in &lt;a href="http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues&amp;amp;referringTitle=Home" target="_blank"&gt;Known
Issues&lt;/a&gt;. &lt;a href="http://blogs.msdn.com/jnak" target="_blank"&gt;Jim Nakashima&lt;/a&gt; actually &lt;a href="http://blogs.msdn.com/b/jnak/archive/2010/05/27/wcf-on-windows-azure.aspx" target="_blank"&gt;posted
about this&lt;/a&gt; the other day as well in detail on his blog as well, so I won't dig
into this again here.
&lt;/p&gt;
&lt;p&gt;
Lastly, if you just want the code from the show, &lt;a href="http://cid-4225352e17899c6d.office.live.com/self.aspx/Public/CloudWCF.zip" target="_blank"&gt;have
at it&lt;/a&gt;!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=e9f56683-03b1-415a-8d3f-a9bd51e57238" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,e9f56683-03b1-415a-8d3f-a9bd51e57238.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=351f9dc7-0c05-4202-8ef2-830491c36339</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,351f9dc7-0c05-4202-8ef2-830491c36339.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,351f9dc7-0c05-4202-8ef2-830491c36339.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=351f9dc7-0c05-4202-8ef2-830491c36339</wfw:commentRss>
      <slash:comments>5</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I am happy to announce the public release of the <a href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=windowsazuremmc&amp;ReleaseId=4342">Windows
Azure MMC - May Release</a>.  It is a very significant upgrade to the previous
version on Code Gallery.  So much, in fact, I tend to unofficially call it v2
(it has been called the <strong>May Release</strong> on Code Gallery).  In addition
to all-new and faster storage browsing capabilities, we have added service management
as well as diagnostics support.  We have also rebuilt the tool from the ground
up to support extensibility.  You can replace or supplement our table viewers,
log viewers, and diagnostics tooling with your own creation.
</p>
        <p>
This update has been in the pipeline for a very long time.  It was actually finished
and ready to go in late January.  Given the amount of code however that we had
to invest to produce this tool, we had to go through a lengthy legal review and produce
a new EULA.  As such, you may notice that we are no longer offering the source
code in this release to the MMC snap-in itself.  Included in this release is
the source for the <a href="http://code.msdn.microsoft.com/azurecmdlets">WASM cmdlets</a>,
but not for the MMC or the default plugins.  In the future, we hope to be able
to release the source code in its entirety.
</p>
        <p>
 
</p>
        <h2>Features At A Glance:
</h2>
        <p>
 
</p>
        <table border="0" cellspacing="0" cellpadding="2" width="509">
          <tbody>
            <tr>
              <td valign="top" width="83" align="center">
                <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/hosted_services_2.png">
                  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="hosted_services" border="0" alt="hosted_services" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/hosted_services_thumb.png" width="53" height="53" />
                </a>
              </td>
              <td valign="top" width="132">
                <strong>Hosted Services</strong>
              </td>
              <td valign="top" width="292">
Upload / configure / control / upgrade / swap / remove Windows Azure application deployments 
<br /></td>
            </tr>
            <tr>
              <td valign="top" width="87" align="center">
                <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/diagnostics_2.png">
                  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="diagnostics" border="0" alt="diagnostics" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/diagnostics_thumb.png" width="39" height="40" />
                </a>
              </td>
              <td valign="top" width="133">
                <strong>Diagnostics</strong>
              </td>
              <td valign="top" width="289">
Configure instrumentation for Windows Azure applications (diagnostics) per source
(perf counters, file based, app logs, infrastructure logs, event logs).  
Transfer the diagnostic data on-demand or scheduled. 
<br /><br />
View / Analyze / Export to Excel and Clear instrumentation results. 
<br /><br /></td>
            </tr>
            <tr>
              <td valign="top" width="90" align="center">
                <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/certificates_2.png">
                  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="certificates" border="0" alt="certificates" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/certificates_thumb.png" width="48" height="48" />
                </a>
              </td>
              <td valign="top" width="133">
                <strong>Certificates</strong>
              </td>
              <td valign="top" width="286">
Upload / manage certificates for Windows Azure applications</td>
            </tr>
            <tr>
              <td valign="top" width="92" align="center">
                <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/storage_services_2.png">
                  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="storage_services" border="0" alt="storage_services" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/storage_services_thumb.png" width="48" height="48" />
                </a>
              </td>
              <td valign="top" width="132">
                <strong>Storage Services</strong>
              </td>
              <td valign="top" width="285">
Configure Storage Services for Windows Azure applications</td>
            </tr>
            <tr>
              <td valign="top" width="94" align="center">
                <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/blobs_2.png">
                  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="blobs" border="0" alt="blobs" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/blobs_thumb.png" width="48" height="48" />
                </a>
              </td>
              <td valign="top" width="132">
                <strong>BLOBs and Containers</strong>
              </td>
              <td valign="top" width="284">
Add / Upload / Download / Remove BLOBs and Containers and connect to multiple storage
accounts 
<br /></td>
            </tr>
            <tr>
              <td valign="top" width="96" align="center">
                <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/queues_2.png">
                  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="queues" border="0" alt="queues" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/queues_thumb.png" width="49" height="48" />
                </a>
              </td>
              <td valign="top" width="132">
                <strong>Queues</strong>
              </td>
              <td valign="top" width="282">
Add / Purge / Delete Windows Azure Queues</td>
            </tr>
            <tr>
              <td valign="top" width="97" align="center">
                <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/tables_2.png">
                  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="tables" border="0" alt="tables" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/tables_thumb.png" width="48" height="48" />
                </a>
              </td>
              <td valign="top" width="132">
                <strong>Tables</strong>
              </td>
              <td valign="top" width="282">
Query and delete Windows Azure Tables</td>
            </tr>
            <tr>
              <td valign="top" width="98" align="center">
                <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/extensibility_2.png">
                  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="extensibility" border="0" alt="extensibility" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/extensibility_thumb.png" width="49" height="48" />
                </a>
              </td>
              <td valign="top" width="131">
                <strong>Extensibility</strong>
              </td>
              <td valign="top" width="281">
Create plugins for rich diagnostics data visualization (e.g. add your own visualizer
for performance counters). Create plugins for table viewers and editors or add completely
new modules!  Plugin Engine uses MEF (extensibility framework) to easily add
functionality. 
<br /><br /></td>
            </tr>
            <tr>
              <td valign="top" width="99" align="center">
                <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/powershell_2.png">
                  <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="powershell" border="0" alt="powershell" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/powershell_thumb.png" width="67" height="50" />
                </a>
              </td>
              <td valign="top" width="131">
                <strong>PowerShell-based backend</strong>
              </td>
              <td valign="top" width="281">
The backend is based on PowerShell cmdlets. If you don't like our UI, you can still
use the underlying cmdlets and script out anything we do</td>
            </tr>
          </tbody>
        </table>
        <p>
 
</p>
        <h2>How To Get Started:
</h2>
        <p>
There are so many features and updates in this release that I have prepared a very
quick <a href="http://dunnry.blob.core.windows.net/videos/WindowsAzureMMC.wmv?sr=b&amp;si=sc&amp;sig=Y%2BOq2niX87LxaM6%2FBbUthD%2FpcUPvyItzGByTPfAq00Q%3D">15-min
screencast</a> on the features and how to get started managing your services and diagnostics
in Windows Azure today!
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=351f9dc7-0c05-4202-8ef2-830491c36339" />
      </body>
      <title>Windows Azure MMC v2 Released</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,351f9dc7-0c05-4202-8ef2-830491c36339.aspx</guid>
      <link>http://dunnry.com/blog/2010/05/11/WindowsAzureMMCV2Released.aspx</link>
      <pubDate>Tue, 11 May 2010 00:04:25 GMT</pubDate>
      <description>&lt;p&gt;
I am happy to announce the public release of the &lt;a href="https://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=windowsazuremmc&amp;amp;ReleaseId=4342"&gt;Windows
Azure MMC - May Release&lt;/a&gt;.&amp;#160; It is a very significant upgrade to the previous
version on Code Gallery.&amp;#160; So much, in fact, I tend to unofficially call it v2
(it has been called the &lt;strong&gt;May Release&lt;/strong&gt; on Code Gallery).&amp;#160; In addition
to all-new and faster storage browsing capabilities, we have added service management
as well as diagnostics support.&amp;#160; We have also rebuilt the tool from the ground
up to support extensibility.&amp;#160; You can replace or supplement our table viewers,
log viewers, and diagnostics tooling with your own creation.
&lt;/p&gt;
&lt;p&gt;
This update has been in the pipeline for a very long time.&amp;#160; It was actually finished
and ready to go in late January.&amp;#160; Given the amount of code however that we had
to invest to produce this tool, we had to go through a lengthy legal review and produce
a new EULA.&amp;#160; As such, you may notice that we are no longer offering the source
code in this release to the MMC snap-in itself.&amp;#160; Included in this release is
the source for the &lt;a href="http://code.msdn.microsoft.com/azurecmdlets"&gt;WASM cmdlets&lt;/a&gt;,
but not for the MMC or the default plugins.&amp;#160; In the future, we hope to be able
to release the source code in its entirety.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;h2&gt;Features At A Glance:
&lt;/h2&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="2" width="509"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="83" align="center"&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/hosted_services_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="hosted_services" border="0" alt="hosted_services" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/hosted_services_thumb.png" width="53" height="53" /&gt;&lt;/a&gt; 
&lt;/td&gt;
&lt;td valign="top" width="132"&gt;
&lt;strong&gt;Hosted Services&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="292"&gt;
Upload / configure / control / upgrade / swap / remove Windows Azure application deployments 
&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="87" align="center"&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/diagnostics_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="diagnostics" border="0" alt="diagnostics" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/diagnostics_thumb.png" width="39" height="40" /&gt;&lt;/a&gt; 
&lt;/td&gt;
&lt;td valign="top" width="133"&gt;
&lt;strong&gt;Diagnostics&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="289"&gt;
Configure instrumentation for Windows Azure applications (diagnostics) per source
(perf counters, file based, app logs, infrastructure logs, event logs).&amp;#160;&amp;#160;
Transfer the diagnostic data on-demand or scheduled. 
&lt;br /&gt;
&lt;br /&gt;
View / Analyze / Export to Excel and Clear instrumentation results. 
&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="90" align="center"&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/certificates_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="certificates" border="0" alt="certificates" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/certificates_thumb.png" width="48" height="48" /&gt;&lt;/a&gt; 
&lt;/td&gt;
&lt;td valign="top" width="133"&gt;
&lt;strong&gt;Certificates&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="286"&gt;
Upload / manage certificates for Windows Azure applications&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="92" align="center"&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/storage_services_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="storage_services" border="0" alt="storage_services" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/storage_services_thumb.png" width="48" height="48" /&gt;&lt;/a&gt; 
&lt;/td&gt;
&lt;td valign="top" width="132"&gt;
&lt;strong&gt;Storage Services&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="285"&gt;
Configure Storage Services for Windows Azure applications&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="94" align="center"&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/blobs_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="blobs" border="0" alt="blobs" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/blobs_thumb.png" width="48" height="48" /&gt;&lt;/a&gt; 
&lt;/td&gt;
&lt;td valign="top" width="132"&gt;
&lt;strong&gt;BLOBs and Containers&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="284"&gt;
Add / Upload / Download / Remove BLOBs and Containers and connect to multiple storage
accounts 
&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="96" align="center"&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/queues_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="queues" border="0" alt="queues" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/queues_thumb.png" width="49" height="48" /&gt;&lt;/a&gt; 
&lt;/td&gt;
&lt;td valign="top" width="132"&gt;
&lt;strong&gt;Queues&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="282"&gt;
Add / Purge / Delete Windows Azure Queues&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="97" align="center"&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/tables_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="tables" border="0" alt="tables" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/tables_thumb.png" width="48" height="48" /&gt;&lt;/a&gt; 
&lt;/td&gt;
&lt;td valign="top" width="132"&gt;
&lt;strong&gt;Tables&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="282"&gt;
Query and delete Windows Azure Tables&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="98" align="center"&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/extensibility_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="extensibility" border="0" alt="extensibility" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/extensibility_thumb.png" width="49" height="48" /&gt;&lt;/a&gt; 
&lt;/td&gt;
&lt;td valign="top" width="131"&gt;
&lt;strong&gt;Extensibility&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="281"&gt;
Create plugins for rich diagnostics data visualization (e.g. add your own visualizer
for performance counters). Create plugins for table viewers and editors or add completely
new modules!&amp;#160; Plugin Engine uses MEF (extensibility framework) to easily add
functionality. 
&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="99" align="center"&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/powershell_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="powershell" border="0" alt="powershell" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureMMCv2Released_E950/powershell_thumb.png" width="67" height="50" /&gt;&lt;/a&gt; 
&lt;/td&gt;
&lt;td valign="top" width="131"&gt;
&lt;strong&gt;PowerShell-based backend&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="281"&gt;
The backend is based on PowerShell cmdlets. If you don't like our UI, you can still
use the underlying cmdlets and script out anything we do&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;h2&gt;How To Get Started:
&lt;/h2&gt;
&lt;p&gt;
There are so many features and updates in this release that I have prepared a very
quick &lt;a href="http://dunnry.blob.core.windows.net/videos/WindowsAzureMMC.wmv?sr=b&amp;amp;si=sc&amp;amp;sig=Y%2BOq2niX87LxaM6%2FBbUthD%2FpcUPvyItzGByTPfAq00Q%3D"&gt;15-min
screencast&lt;/a&gt; on the features and how to get started managing your services and diagnostics
in Windows Azure today!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=351f9dc7-0c05-4202-8ef2-830491c36339" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,351f9dc7-0c05-4202-8ef2-830491c36339.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Tools</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=23bdb6cd-41aa-474d-b5ef-2e2fa586c0b1</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,23bdb6cd-41aa-474d-b5ef-2e2fa586c0b1.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,23bdb6cd-41aa-474d-b5ef-2e2fa586c0b1.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=23bdb6cd-41aa-474d-b5ef-2e2fa586c0b1</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I have been largely offline for the last 3 weeks because I have been on parental leave
(<a href="http://dunnry.com/blog/FirstDayOfParentalLeave.aspx" target="_blank">again</a>). 
I was lucky enough to have another baby girl last December right around Christmas. 
Working for Microsoft, this means that within the first year, you can take 4 weeks
off to be at home with your new baby.  It is a terrific benefit.  Hence,
for the last 3 weeks I have been largely caring for my youngest alone while her older
sister is at daycare.  What a unique bonding experience - it is something that
has been wonderful.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LastweekofParentalLeave_B3C1/Priya_2.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Priya" border="0" alt="Priya" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LastweekofParentalLeave_B3C1/Priya_thumb.jpg" width="504" height="379" />
          </a>  
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LastweekofParentalLeave_B3C1/Sisters_2.jpg">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Sisters" border="0" alt="Sisters" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LastweekofParentalLeave_B3C1/Sisters_thumb.jpg" width="504" height="379" />
          </a>
        </p>
        <p>
Anyhow, I will be back to work next week and I know that I will miss my time here. 
It has gone by far too fast.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=23bdb6cd-41aa-474d-b5ef-2e2fa586c0b1" />
      </body>
      <title>Last Week of Parental Leave</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,23bdb6cd-41aa-474d-b5ef-2e2fa586c0b1.aspx</guid>
      <link>http://dunnry.com/blog/2010/04/21/LastWeekOfParentalLeave.aspx</link>
      <pubDate>Wed, 21 Apr 2010 20:02:23 GMT</pubDate>
      <description>&lt;p&gt;
I have been largely offline for the last 3 weeks because I have been on parental leave
(&lt;a href="http://dunnry.com/blog/FirstDayOfParentalLeave.aspx" target="_blank"&gt;again&lt;/a&gt;).&amp;#160;
I was lucky enough to have another baby girl last December right around Christmas.&amp;#160;
Working for Microsoft, this means that within the first year, you can take 4 weeks
off to be at home with your new baby.&amp;#160; It is a terrific benefit.&amp;#160; Hence,
for the last 3 weeks I have been largely caring for my youngest alone while her older
sister is at daycare.&amp;#160; What a unique bonding experience - it is something that
has been wonderful.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LastweekofParentalLeave_B3C1/Priya_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Priya" border="0" alt="Priya" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LastweekofParentalLeave_B3C1/Priya_thumb.jpg" width="504" height="379" /&gt;&lt;/a&gt;&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LastweekofParentalLeave_B3C1/Sisters_2.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Sisters" border="0" alt="Sisters" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LastweekofParentalLeave_B3C1/Sisters_thumb.jpg" width="504" height="379" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Anyhow, I will be back to work next week and I know that I will miss my time here.&amp;#160;
It has gone by far too fast.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=23bdb6cd-41aa-474d-b5ef-2e2fa586c0b1" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,23bdb6cd-41aa-474d-b5ef-2e2fa586c0b1.aspx</comments>
      <category>Personal</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=6354edb9-a6ac-40ab-900a-e1e95f9afe0d</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,6354edb9-a6ac-40ab-900a-e1e95f9afe0d.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,6354edb9-a6ac-40ab-900a-e1e95f9afe0d.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=6354edb9-a6ac-40ab-900a-e1e95f9afe0d</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
In Episode 3 of <a href="http://channel9.msdn.com/shows/Cloud+Cover">Cloud Cover</a>,
I mentioned the tip of the week was how to measure your database size in SQL Azure. 
Here is the exact queries you can run to do it:
</p>
        <code>
          <p>
select 
<br />
      sum(reserved_page_count) * 8.0 / 1024 
<br />
from 
<br />
      sys.dm_db_partition_stats 
<br />
GO 
</p>
          <p>
select 
<br />
      sys.objects.name, sum(reserved_page_count) * 8.0 /
1024 
<br />
from 
<br />
      sys.dm_db_partition_stats, sys.objects 
<br />
where 
<br />
      sys.dm_db_partition_stats.object_id = sys.objects.object_id 
</p>
          <p>
group by sys.objects.name
</p>
        </code>
        <p>
The first one will give you the size of your database in MB and the second one will
do the same, but break it out for each object in your database.
</p>
        <p>
Hat tip to David Robinson and Tony Petrossian on the <a href="http://blogs.msdn.com/sqlazure">SQL
Azure team</a> for the query.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=6354edb9-a6ac-40ab-900a-e1e95f9afe0d" />
      </body>
      <title>Calculating the Size of Your SQL Azure Database</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,6354edb9-a6ac-40ab-900a-e1e95f9afe0d.aspx</guid>
      <link>http://dunnry.com/blog/2010/03/05/CalculatingTheSizeOfYourSQLAzureDatabase.aspx</link>
      <pubDate>Fri, 05 Mar 2010 06:05:13 GMT</pubDate>
      <description>&lt;p&gt;
In Episode 3 of &lt;a href="http://channel9.msdn.com/shows/Cloud+Cover"&gt;Cloud Cover&lt;/a&gt;,
I mentioned the tip of the week was how to measure your database size in SQL Azure.&amp;#160;
Here is the exact queries you can run to do it:
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
select 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sum(reserved_page_count) * 8.0 / 1024 
&lt;br /&gt;
from 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sys.dm_db_partition_stats 
&lt;br /&gt;
GO 
&lt;/p&gt;
&lt;p&gt;
select 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sys.objects.name, sum(reserved_page_count) * 8.0 /
1024 
&lt;br /&gt;
from 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sys.dm_db_partition_stats, sys.objects 
&lt;br /&gt;
where 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; sys.dm_db_partition_stats.object_id = sys.objects.object_id 
&lt;/p&gt;
&lt;p&gt;
group by sys.objects.name
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
The first one will give you the size of your database in MB and the second one will
do the same, but break it out for each object in your database.
&lt;/p&gt;
&lt;p&gt;
Hat tip to David Robinson and Tony Petrossian on the &lt;a href="http://blogs.msdn.com/sqlazure"&gt;SQL
Azure team&lt;/a&gt; for the query.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=6354edb9-a6ac-40ab-900a-e1e95f9afe0d" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,6354edb9-a6ac-40ab-900a-e1e95f9afe0d.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=094d1cbc-596a-4750-b019-4c8d119f7a9a</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,094d1cbc-596a-4750-b019-4c8d119f7a9a.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,094d1cbc-596a-4750-b019-4c8d119f7a9a.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=094d1cbc-596a-4750-b019-4c8d119f7a9a</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WASMCmdletsUpdated_CA71/image_2.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WASMCmdletsUpdated_CA71/image_thumb.png" width="442" height="71" />
          </a>
        </p>
        <p>
I am happy to announce the updated release of the <a href="http://code.msdn.microsoft.com/azurecmdlets">Windows
Azure Service Management (WASM) Cmdlets</a> for PowerShell today. With these cmdlets
you can effectively automate and manage all your services in Windows Azure. Specifically,
</p>
        <ul>
          <li>
            <b>Deploy new Hosted Services</b>
            <ul>
              <li>
Automatically upload your packages from the file system to blob storage. 
</li>
            </ul>
          </li>
          <li>
            <b>Upgrade your services</b>
            <ul>
              <li>
Choose between automatic or manual rolling upgrades 
</li>
              <li>
Swap between staging and production environments 
</li>
            </ul>
          </li>
          <li>
            <b>Remove your Hosted Services</b>
            <ul>
              <li>
Automatically pull down your services at the end of the day to stop billing. This
is a critical need for test and development environments. 
</li>
            </ul>
          </li>
          <li>
            <b>Manage your Storage accounts</b>
            <ul>
              <li>
Retrieve or regenerate your storage keys 
</li>
            </ul>
          </li>
          <li>
            <b>Manage your Certificates</b>
            <ul>
              <li>
Deploy certificates from your Windows store or the local filesystem 
</li>
            </ul>
          </li>
          <li>
            <b>Configure your Diagnostics</b>
            <ul>
              <li>
Remotely configure the event sources you wish to monitor (Event Logs, Tracing, IIS
Logs, Performance Counters and more) 
</li>
            </ul>
          </li>
          <li>
            <b>Transfer your Diagnostics Information</b>
            <ul>
              <li>
Schedule your transfers or Transfer on Demand. 
</li>
            </ul>
          </li>
        </ul>
        <p>
          <a href="http://code.msdn.microsoft.com/azurecmdlets">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image003" border="0" alt="clip_image003" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WASMCmdletsUpdated_CA71/clip_image003_aef5844e-d413-41d9-b9b3-9100aa503c86.jpg" width="500" height="310" />
          </a>
        </p>
        <p>
          <b>Why did we build this?</b>
        </p>
        <p>
The WASM cmdlets were built to unblock adoption for many of our customers as well
as serve as a common underpinning to our labs and internal tooling. There was an immediate
demand for an automation API that would fit into the standard toolset for IT Pros.
Given the adoption and penetration of PowerShell, we determined that cmdlets focused
on this core audience would be the most effective way forward. Furthermore, since
PowerShell is a full scripting language with complete access to .NET, this allows
these cmdlets to be used as the basis for very complicated deployment and automation
scripts as part of the application lifecycle.
</p>
        <p>
          <b>How can you use them?</b>
        </p>
        <p>
Every call to the Service Management API requires an X509 certificate and the subscription
ID for the account. To get started, you need to upload a valid certificate to the
portal and have it installed locally to your workstation. If you are unfamiliar with
how to do this, you can follow the procedure outlined on the Windows Azure Channel9
Learning Center <a href="http://channel9.msdn.com/learn/courses/Azure/Deployment/DeployingApplicationsinWindowsAzure/Exercise-2-Using-PowerShell-to-Manage-Windows-Azure-Applications/">here</a>.
</p>
        <p>
Here are a few examples of how to use the cmdlets for a variety of common tasks:
</p>
        <p>
          <b>Common Setup</b>
        </p>
        <p>
Each script referenced below will refer to the following variables:
</p>
        <code>
          <p>
Add-PSSnapin AzureManagementToolsSnapIn
</p>
          <p>
#get your local certificate for authentication
</p>
          <p>
$cert = Get-Item cert:\CurrentUser\My\&lt;YourThumbPrint&gt;
</p>
          <p>
#subID from portal
</p>
          <p>
$sub = 'c9f9b345-7ff5-4eba-9d58-0cea5793050c'
</p>
          <p>
#your service name (without .cloudapp.net)
</p>
          <p>
$service = 'yourservice'
</p>
          <p>
#path to package (can also be http: address in blob storage)
</p>
          <p>
$package = "D:\deploy\MyPackage.cspkg"
</p>
          <p>
#configuration file
</p>
          <p>
$config = "D:\deploy\ServiceConfiguration.cscfg"
</p>
        </code>
        <p>
 
</p>
        <p>
          <strong>Listing My Hosted Services</strong>
        </p>
        <code>
          <p>
Get-HostedServices -SubscriptionId $sub -Certificate $cert
</p>
        </code>
        <p>
 
</p>
        <p>
          <strong>View Production Service Status</strong>
        </p>
        <code>
          <p>
Get-HostedService $service -SubscriptionId $sub -Certificate $cert | 
</p>
          <p>
Get-Deployment 'Production' | 
</p>
          <p>
select RoleInstanceList -ExpandProperty RoleInstanceList | 
</p>
          <p>
ft InstanceName, InstanceStatus -GroupBy RoleName
</p>
        </code>
        <p>
 
</p>
        <p>
          <strong>Creating a new deployment</strong>
        </p>
        <code>
          <p>
#Create a new Deployment
</p>
          <p>
Get-HostedService $service -SubscriptionId $sub -Certificate $cert |
</p>
          <p>
New-Deployment -Slot Production -Package $package -Configuration $config -Label 'v1'
|
</p>
          <p>
Get-OperationStatus -WaitToComplete
</p>
          <p>
#Set the service to 'Running'
</p>
          <p>
Get-HostedService $service -SubscriptionId $sub -Certificate $cert |
</p>
          <p>
Get-Deployment 'Production'|
</p>
          <p>
Set-DeploymentStatus 'Running' |
</p>
          <p>
Get-OperationStatus -WaitToComplete
</p>
        </code>
        <p>
 
</p>
        <p>
          <strong>Removing a deployment</strong>
        </p>
        <code>
          <p>
#Ensure that the service is first in Suspended mode
</p>
          <p>
Get-HostedService $service -SubscriptionId $sub -Certificate $cert |
</p>
          <p>
Get-Deployment 'Production'|
</p>
          <p>
Set-DeploymentStatus 'Suspended' |
</p>
          <p>
Get-OperationStatus -WaitToComplete |
</p>
          <p>
#Remove the deployment
</p>
          <p>
Get-HostedService $service -SubscriptionId $sub -Certificate $cert |
</p>
          <p>
Get-Deployment 'Production'|
</p>
          <p>
Remove-Deployment
</p>
        </code>
        <p>
 
</p>
        <p>
          <strong>Upgrading a single Role</strong>
        </p>
        <code>
          <p>
Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub |
</p>
          <p>
Get-Deployment -Slot Production | 
</p>
          <p>
Set-Deployment -mode Auto -roleName 'WebRole1' -package $package -label 'v1.2' |
</p>
          <p>
Get-OperationStatus -WaitToComplete
</p>
          <p>
 
</p>
          <p>
            <strong>Adding a local certificate</strong>
          </p>
          <p>
$deploycert = Get-Item cert:\CurrentUser\My\CBF145B628EA06685419AEDBB1EEE78805B135A2
</p>
          <p>
Get-HostedService $service -SubscriptionId $sub -Certificate $cert |
</p>
          <p>
Add-Certificate -CertificateToDeploy $deploycert |
</p>
          <p>
Get-OperationStatus -WaitToComplete
</p>
        </code>
        <p>
 
</p>
        <p>
          <strong>Configuring Diagnostics - Adding a Performance Counter to All Running Instances</strong>
        </p>
        <code>
          <p>
#get storage account name and key
</p>
          <p>
$storage = "yourstorageaccount"
</p>
          <p>
$key = (Get-StorageKeys -ServiceName $storage -Certificate $cert `
</p>
          <p>
    -SubscriptionId $sub).Primary
</p>
          <p>
 
</p>
          <p>
$deployId = (Get-HostedService $service -SubscriptionId $sub `
</p>
          <p>
    -Certificate $cert | Get-Deployment Production).DeploymentId
</p>
          <p>
 
</p>
          <p>
$counter = '\Processor\(_Total)\% Processor Time'
</p>
          <p>
$rate = [TimeSpan]::FromSeconds(5)
</p>
          <p>
 
</p>
          <p>
Get-DiagnosticAwareRoles -StorageAccountName $storage -StorageAccountKey $key `
</p>
          <p>
-DeploymentId $deployId |
</p>
          <p>
foreach {
</p>
          <p>
    $role = $_
</p>
          <p>
    Get-DiagnosticAwareRoleInstances $role -DeploymentId $deployId
`
</p>
          <p>
    -StorageAccountName $storage -StorageAccountKey $key |
</p>
          <p>
    foreach {
</p>
          <p>
        $instance = $_
</p>
          <p>
        $config = Get-DiagnosticConfiguration -RoleName
$role -InstanceId $_ `
</p>
          <p>
            -StorageAccountName
$storage -StorageAccountKey $key `
</p>
          <p>
            -BufferName PerformanceCounters
-DeploymentId $deployId 
</p>
          <p>
        $perf = New-Object Microsoft.WindowsAzure.Diagnostics.PerformanceCounterConfiguration
`
</p>
          <p>
            -Property @{CounterSpecifier=$counter;
SampleRate=$rate}
</p>
          <p>
        $config.DataSources.Add($perf)
</p>
          <p>
        $config.DataSources | 
</p>
          <p>
         foreach { 
</p>
          <p>
             Set-PerformanceCounter
-PerformanceCounters $_ -RoleName $role `
</p>
          <p>
             -InstanceId
$instance -DeploymentId $deployId -StorageAccountName $storage `
</p>
          <p>
             -StorageAccountKey
$key
</p>
          <p>
         }
</p>
          <p>
    }    
</p>
          <p>
}
</p>
        </code>
        <p>
        </p>
        <p>
          <b>More Examples</b>
        </p>
        <p>
You can find more examples and documentation on these cmdlets by typing <b><i>'Get-Help
&lt;cmdlet&gt; -full'</i></b> from the PowerShell cmd prompt.
</p>
        <p>
If you have any questions for feedback, please send it directly to me through the
blog (look at right hand navigation pane for Contact Ryan link).
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=094d1cbc-596a-4750-b019-4c8d119f7a9a" />
      </body>
      <title>WASM Cmdlets Updated</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,094d1cbc-596a-4750-b019-4c8d119f7a9a.aspx</guid>
      <link>http://dunnry.com/blog/2010/02/17/WASMCmdletsUpdated.aspx</link>
      <pubDate>Wed, 17 Feb 2010 22:30:45 GMT</pubDate>
      <description>&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WASMCmdletsUpdated_CA71/image_2.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WASMCmdletsUpdated_CA71/image_thumb.png" width="442" height="71" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
I am happy to announce the updated release of the &lt;a href="http://code.msdn.microsoft.com/azurecmdlets"&gt;Windows
Azure Service Management (WASM) Cmdlets&lt;/a&gt; for PowerShell today. With these cmdlets
you can effectively automate and manage all your services in Windows Azure. Specifically,
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Deploy new Hosted Services&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
Automatically upload your packages from the file system to blob storage. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Upgrade your services&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
Choose between automatic or manual rolling upgrades 
&lt;/li&gt;
&lt;li&gt;
Swap between staging and production environments 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Remove your Hosted Services&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
Automatically pull down your services at the end of the day to stop billing. This
is a critical need for test and development environments. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Manage your Storage accounts&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
Retrieve or regenerate your storage keys 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Manage your Certificates&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
Deploy certificates from your Windows store or the local filesystem 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Configure your Diagnostics&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
Remotely configure the event sources you wish to monitor (Event Logs, Tracing, IIS
Logs, Performance Counters and more) 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Transfer your Diagnostics Information&lt;/b&gt; 
&lt;ul&gt;
&lt;li&gt;
Schedule your transfers or Transfer on Demand. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;a href="http://code.msdn.microsoft.com/azurecmdlets"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image003" border="0" alt="clip_image003" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WASMCmdletsUpdated_CA71/clip_image003_aef5844e-d413-41d9-b9b3-9100aa503c86.jpg" width="500" height="310" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Why did we build this?&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
The WASM cmdlets were built to unblock adoption for many of our customers as well
as serve as a common underpinning to our labs and internal tooling. There was an immediate
demand for an automation API that would fit into the standard toolset for IT Pros.
Given the adoption and penetration of PowerShell, we determined that cmdlets focused
on this core audience would be the most effective way forward. Furthermore, since
PowerShell is a full scripting language with complete access to .NET, this allows
these cmdlets to be used as the basis for very complicated deployment and automation
scripts as part of the application lifecycle.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;How can you use them?&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
Every call to the Service Management API requires an X509 certificate and the subscription
ID for the account. To get started, you need to upload a valid certificate to the
portal and have it installed locally to your workstation. If you are unfamiliar with
how to do this, you can follow the procedure outlined on the Windows Azure Channel9
Learning Center &lt;a href="http://channel9.msdn.com/learn/courses/Azure/Deployment/DeployingApplicationsinWindowsAzure/Exercise-2-Using-PowerShell-to-Manage-Windows-Azure-Applications/"&gt;here&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
Here are a few examples of how to use the cmdlets for a variety of common tasks:
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Common Setup&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
Each script referenced below will refer to the following variables:
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
Add-PSSnapin AzureManagementToolsSnapIn
&lt;/p&gt;
&lt;p&gt;
#get your local certificate for authentication
&lt;/p&gt;
&lt;p&gt;
$cert = Get-Item cert:\CurrentUser\My\&amp;lt;YourThumbPrint&amp;gt;
&lt;/p&gt;
&lt;p&gt;
#subID from portal
&lt;/p&gt;
&lt;p&gt;
$sub = 'c9f9b345-7ff5-4eba-9d58-0cea5793050c'
&lt;/p&gt;
&lt;p&gt;
#your service name (without .cloudapp.net)
&lt;/p&gt;
&lt;p&gt;
$service = 'yourservice'
&lt;/p&gt;
&lt;p&gt;
#path to package (can also be http: address in blob storage)
&lt;/p&gt;
&lt;p&gt;
$package = "D:\deploy\MyPackage.cspkg"
&lt;/p&gt;
&lt;p&gt;
#configuration file
&lt;/p&gt;
&lt;p&gt;
$config = "D:\deploy\ServiceConfiguration.cscfg"
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Listing My Hosted Services&lt;/strong&gt;
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
Get-HostedServices -SubscriptionId $sub -Certificate $cert
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;View Production Service Status&lt;/strong&gt;
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
Get-HostedService $service -SubscriptionId $sub -Certificate $cert | 
&lt;/p&gt;
&lt;p&gt;
Get-Deployment 'Production' | 
&lt;/p&gt;
&lt;p&gt;
select RoleInstanceList -ExpandProperty RoleInstanceList | 
&lt;/p&gt;
&lt;p&gt;
ft InstanceName, InstanceStatus -GroupBy RoleName
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Creating a new deployment&lt;/strong&gt;
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
#Create a new Deployment
&lt;/p&gt;
&lt;p&gt;
Get-HostedService $service -SubscriptionId $sub -Certificate $cert |
&lt;/p&gt;
&lt;p&gt;
New-Deployment -Slot Production -Package $package -Configuration $config -Label 'v1'
|
&lt;/p&gt;
&lt;p&gt;
Get-OperationStatus -WaitToComplete
&lt;/p&gt;
&lt;p&gt;
#Set the service to 'Running'
&lt;/p&gt;
&lt;p&gt;
Get-HostedService $service -SubscriptionId $sub -Certificate $cert |
&lt;/p&gt;
&lt;p&gt;
Get-Deployment 'Production'|
&lt;/p&gt;
&lt;p&gt;
Set-DeploymentStatus 'Running' |
&lt;/p&gt;
&lt;p&gt;
Get-OperationStatus -WaitToComplete
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Removing a deployment&lt;/strong&gt;
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
#Ensure that the service is first in Suspended mode
&lt;/p&gt;
&lt;p&gt;
Get-HostedService $service -SubscriptionId $sub -Certificate $cert |
&lt;/p&gt;
&lt;p&gt;
Get-Deployment 'Production'|
&lt;/p&gt;
&lt;p&gt;
Set-DeploymentStatus 'Suspended' |
&lt;/p&gt;
&lt;p&gt;
Get-OperationStatus -WaitToComplete |
&lt;/p&gt;
&lt;p&gt;
#Remove the deployment
&lt;/p&gt;
&lt;p&gt;
Get-HostedService $service -SubscriptionId $sub -Certificate $cert |
&lt;/p&gt;
&lt;p&gt;
Get-Deployment 'Production'|
&lt;/p&gt;
&lt;p&gt;
Remove-Deployment
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Upgrading a single Role&lt;/strong&gt;
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub |
&lt;/p&gt;
&lt;p&gt;
Get-Deployment -Slot Production | 
&lt;/p&gt;
&lt;p&gt;
Set-Deployment -mode Auto -roleName 'WebRole1' -package $package -label 'v1.2' |
&lt;/p&gt;
&lt;p&gt;
Get-OperationStatus -WaitToComplete
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Adding a local certificate&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
$deploycert = Get-Item cert:\CurrentUser\My\CBF145B628EA06685419AEDBB1EEE78805B135A2
&lt;/p&gt;
&lt;p&gt;
Get-HostedService $service -SubscriptionId $sub -Certificate $cert |
&lt;/p&gt;
&lt;p&gt;
Add-Certificate -CertificateToDeploy $deploycert |
&lt;/p&gt;
&lt;p&gt;
Get-OperationStatus -WaitToComplete
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Configuring Diagnostics - Adding a Performance Counter to All Running Instances&lt;/strong&gt;
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
#get storage account name and key
&lt;/p&gt;
&lt;p&gt;
$storage = &amp;quot;yourstorageaccount&amp;quot;
&lt;/p&gt;
&lt;p&gt;
$key = (Get-StorageKeys -ServiceName $storage -Certificate $cert `
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160; -SubscriptionId $sub).Primary
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
$deployId = (Get-HostedService $service -SubscriptionId $sub `
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160; -Certificate $cert | Get-Deployment Production).DeploymentId
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
$counter = '\Processor\(_Total)\% Processor Time'
&lt;/p&gt;
&lt;p&gt;
$rate = [TimeSpan]::FromSeconds(5)
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Get-DiagnosticAwareRoles -StorageAccountName $storage -StorageAccountKey $key `
&lt;/p&gt;
&lt;p&gt;
-DeploymentId $deployId |
&lt;/p&gt;
&lt;p&gt;
foreach {
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160; $role = $_
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160; Get-DiagnosticAwareRoleInstances $role -DeploymentId $deployId
`
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160; -StorageAccountName $storage -StorageAccountKey $key |
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160; foreach {
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $instance = $_
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $config = Get-DiagnosticConfiguration -RoleName
$role -InstanceId $_ `
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -StorageAccountName
$storage -StorageAccountKey $key `
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -BufferName PerformanceCounters
-DeploymentId $deployId 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $perf = New-Object Microsoft.WindowsAzure.Diagnostics.PerformanceCounterConfiguration
`
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -Property @{CounterSpecifier=$counter;
SampleRate=$rate}
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $config.DataSources.Add($perf)
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; $config.DataSources | 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; foreach { 
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Set-PerformanceCounter
-PerformanceCounters $_ -RoleName $role `
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -InstanceId
$instance -DeploymentId $deployId -StorageAccountName $storage `
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; -StorageAccountKey
$key
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; }
&lt;/p&gt;
&lt;p&gt;
&amp;#160;&amp;#160;&amp;#160; }&amp;#160;&amp;#160;&amp;#160; 
&lt;/p&gt;
&lt;p&gt;
}
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;More Examples&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
You can find more examples and documentation on these cmdlets by typing &lt;b&gt;&lt;i&gt;'Get-Help
&amp;lt;cmdlet&amp;gt; -full'&lt;/i&gt;&lt;/b&gt; from the PowerShell cmd prompt.
&lt;/p&gt;
&lt;p&gt;
If you have any questions for feedback, please send it directly to me through the
blog (look at right hand navigation pane for Contact Ryan link).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=094d1cbc-596a-4750-b019-4c8d119f7a9a" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,094d1cbc-596a-4750-b019-4c8d119f7a9a.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>PowerShell</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=ce3359de-0aa7-4997-b380-6cd98bd3af71</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,ce3359de-0aa7-4997-b380-6cd98bd3af71.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,ce3359de-0aa7-4997-b380-6cd98bd3af71.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ce3359de-0aa7-4997-b380-6cd98bd3af71</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Occasionally, I will check online to see the reviews for our book.  It is now
almost 4 years old and a bit outdated with respect to the changes that came with .NET
3.5.  The website and <a href="http://directoryprogramming.net/">forums</a> however
has been trucking along (thanks Joe!) these years.  We never sold a ton of books
about this particular niche topic, but for the audience size, it wasn't too shabby. 
Joe and I are not about to retire on our royalties, however.
</p>
        <p>
I was a bit surprised to see this online however at Amazon:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/TheCollectibleEditionofOurBook_C54E/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/TheCollectibleEditionofOurBook_C54E/image_thumb.png" width="504" height="123" />
          </a>
        </p>
        <p>
Now, it is a bit silly for two reasons, a.) our book as a collectible, really? 
Who would actually collect it?  and b.) It says it was signed by both authors. 
Now, there is a slight chance it is authentic as I think Joe and I signed maybe 2
books together ever.  However, the odds of it being authentic are exceedingly
slim.  Who knows. it's funny regardless.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=ce3359de-0aa7-4997-b380-6cd98bd3af71" />
      </body>
      <title>The Collectible Edition of Our Book</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,ce3359de-0aa7-4997-b380-6cd98bd3af71.aspx</guid>
      <link>http://dunnry.com/blog/2010/02/17/TheCollectibleEditionOfOurBook.aspx</link>
      <pubDate>Wed, 17 Feb 2010 22:01:54 GMT</pubDate>
      <description>&lt;p&gt;
Occasionally, I will check online to see the reviews for our book.&amp;#160; It is now
almost 4 years old and a bit outdated with respect to the changes that came with .NET
3.5.&amp;#160; The website and &lt;a href="http://directoryprogramming.net/"&gt;forums&lt;/a&gt; however
has been trucking along (thanks Joe!) these years.&amp;#160; We never sold a ton of books
about this particular niche topic, but for the audience size, it wasn't too shabby.&amp;#160;
Joe and I are not about to retire on our royalties, however.
&lt;/p&gt;
&lt;p&gt;
I was a bit surprised to see this online however at Amazon:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/TheCollectibleEditionofOurBook_C54E/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/TheCollectibleEditionofOurBook_C54E/image_thumb.png" width="504" height="123" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Now, it is a bit silly for two reasons, a.) our book as a collectible, really?&amp;#160;
Who would actually collect it?&amp;#160; and b.) It says it was signed by both authors.&amp;#160;
Now, there is a slight chance it is authentic as I think Joe and I signed maybe 2
books together ever.&amp;#160; However, the odds of it being authentic are exceedingly
slim.&amp;#160; Who knows. it's funny regardless.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=ce3359de-0aa7-4997-b380-6cd98bd3af71" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,ce3359de-0aa7-4997-b380-6cd98bd3af71.aspx</comments>
      <category>Active Directory</category>
      <category>Book</category>
      <category>LDAP</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=0ed4eb7d-01da-4862-a6ae-ab02247f330f</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,0ed4eb7d-01da-4862-a6ae-ab02247f330f.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,0ed4eb7d-01da-4862-a6ae-ab02247f330f.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=0ed4eb7d-01da-4862-a6ae-ab02247f330f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
One of my most popular posts to this day is <a href="http://dunnry.com/blog/InstallingADAMOnVista.aspx">the
hack to install ADAM</a> (now called AD LDS) on Vista.  It is the source of numerous
emails as well.  So today, I am happy to say that AD LDS (aka ADAM) is available
for Windows 7 officially - no hacks needed.
</p>
        <p>
          <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=a45059af-47a8-4c96-afe3-93dab7b5b658">Download
it here</a>
        </p>
        <p>
Now, I fully realize this doesn't help those that are using Vista today, but there
are quite a few folks that are using Windows 7 or upgrading from Vista or XP to 7. 
LDAP directories are fabulous tools and AD LDS is a great one.  Enjoy.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=0ed4eb7d-01da-4862-a6ae-ab02247f330f" />
      </body>
      <title>ADAM on Windows 7</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,0ed4eb7d-01da-4862-a6ae-ab02247f330f.aspx</guid>
      <link>http://dunnry.com/blog/2010/02/17/ADAMOnWindows7.aspx</link>
      <pubDate>Wed, 17 Feb 2010 21:29:07 GMT</pubDate>
      <description>&lt;p&gt;
One of my most popular posts to this day is &lt;a href="http://dunnry.com/blog/InstallingADAMOnVista.aspx"&gt;the
hack to install ADAM&lt;/a&gt; (now called AD LDS) on Vista.&amp;#160; It is the source of numerous
emails as well.&amp;#160; So today, I am happy to say that AD LDS (aka ADAM) is available
for Windows 7 officially - no hacks needed.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;amp;FamilyID=a45059af-47a8-4c96-afe3-93dab7b5b658"&gt;Download
it here&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Now, I fully realize this doesn't help those that are using Vista today, but there
are quite a few folks that are using Windows 7 or upgrading from Vista or XP to 7.&amp;#160;
LDAP directories are fabulous tools and AD LDS is a great one.&amp;#160; Enjoy.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=0ed4eb7d-01da-4862-a6ae-ab02247f330f" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,0ed4eb7d-01da-4862-a6ae-ab02247f330f.aspx</comments>
      <category>Active Directory</category>
      <category>ADAM</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=40dc15bd-7fda-4229-8230-3e0833303aa6</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,40dc15bd-7fda-4229-8230-3e0833303aa6.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,40dc15bd-7fda-4229-8230-3e0833303aa6.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=40dc15bd-7fda-4229-8230-3e0833303aa6</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Windows Azure storage makes use of a symmetric key authentication system.  Essentially,
we take a 256-bit key and sign each HTTP request to the storage subsystem.  In
order to access storage, you have to prove you know the key.  What this means
of course is that you need to protect that key well.  It is an all-or-nothing
scenario, if you have the key, you can do anything.  If you don't possess the
key, you can do nothing*.
</p>
        <p>
The natural question for most folks when they understand this model is, how can I
grant access to someone without compromising my master key?  The solution turns
out to be something called Shared Access Signatures (SAS) for Windows Azure. 
SAS works by specifying a few query string parameters, canonicalizing those parameters,
hashing them and signing the hash in the query string.  This creates a unique
URL that embeds not only the required access, but the proof that it was created by
someone that knew the master key.  The parameters on the query string are:
</p>
        <ul>
          <li>
            <strong>st</strong> - this is the start time of when the signature becomes valid. 
It is optional.  If not supplied, then now is implied.</li>
          <li>
            <strong>se</strong> - this the the expiration date and time.  All signatures
are timebound and this parameter is required.</li>
          <li>
            <strong>sr</strong> - this is the resource that the signature applies to and will
be either (b)lob or (c)ontainer.  This is required.</li>
          <li>
            <strong>sp</strong> -this is the permission set that you are granting - (r)ead, (w)rite,
(d)elete, and (l)ist.  This is required.</li>
          <li>
            <strong>si</strong> - this is a signed identifier or a named policy that can incorporate
any of the previous elements. Optional.</li>
          <li>
            <strong>sig</strong> - this is the signed hash of the querystring and URI that proves
it was created with the master key.  It is required.</li>
        </ul>
        <p>
There is one other caveat that is important to mention here.  Unless you use
a signed identifier - what I refer to as a policy - there is no way to create a signature
that has a lifetime longer than an hour.  This is for good reason.  A SAS
URL that was mistakenly created with an extremely long lifetime and without using
the signed idenifier (policy) could not be revoked without changing the master key
on the storage account.  If that URL was to leak, your signed resource would
be open to abuse for a potentially long time.  By making the longest lifetime
of a signature only an hour, we have limited the window in which you are exposed.
</p>
        <p>
If you want to create a longer-lived SAS, you must create a policy.  The policy
is very interesting.  Because this policy contains any of those parameters mentioned
above and is stored at the service, it means that we can revoke those permission or
completely change them instantly.
</p>
        <p>
Let's walk through an example using <a href="http://www.myazurestorage.com">MyAzureStorage.com</a>,
where it is trivial to create a SAS.  Once I login to the site, I am going to
select the BLOBs option from the navigation tabs on top.  Here I will see a list
of all my containers.  I can select a container's <strong>Actions</strong> menu
and click <strong>Manage Policies</strong>.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_thumb.png" width="504" height="439" />
          </a> 
</p>
        <p>
Next, I am going to create two policies (signed identifiers), called Read and Write. 
These will have different expirations dates and permission sets.  Notice I am
not specifying a Start Date, so they are immediately valid.
</p>
        <p>
 
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_thumb_1.png" width="504" height="298" />
          </a>
        </p>
        <p>
Next, I am going to select the <strong>Actions</strong> menu for one of the blobs
under this container and click <strong>Share</strong>.  I am going to apply one
of the policies (shared access signature) that I just created by selecting it from
the dropdown.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_6.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_thumb_2.png" width="504" height="342" />
          </a>
        </p>
        <p>
You will notice that the value that I created in the policy fill in the values in
the<strong> Share BLOB</strong> UI and disable you from changing them.  The reason
is that a policy is like a template.  If you don't set a value, then you can
set (or must set it if it is required).  However, if the policy states one of
the parameters, you cannot supply that parameter.  In this case, the 'read' policy
that was created specified the expiration (se) and permissions (sp).  It is implied
from the dialog selection that the resource (sr) is a (b)lob.  The only value
that could be supplied here outside of the policy is the start time (st), which I
am not supplying as it is optional.
</p>
        <p>
When I click the <strong>Get URL</strong> button, I get back a URL that looks like
this:
</p>
        <p>
          <strong>http://&lt;account&gt;.blob.core.windows.net/shared/blobname?sr=b&amp;si=read&amp;sig=hIbD%.%3D</strong>
        </p>
        <p>
Now, if that URL was to leak and I no longer wanted to provide read access to the
blob, I could simply delete the 'read' policy or change the expiration date. 
It would instantly be invalidated.  Compare this to the the same signature created
without a policy:
</p>
        <p>
          <strong>http://&lt;account&gt;.blob.core.windows.net/shared/blobname?se=2010-02-13T02%3A17%3A46Z&amp;sr=b&amp;sp=r&amp;sig=bYfBBb1yf.%3D</strong>
        </p>
        <p>
This signature could not be revoked until it either expired or I regenerated the master
key.
</p>
        <p>
If you want to see how the SAS feature works or easily share blobs or containers in
your Windows Azure storage account, give it a try at <a href="http://www.myazurestorage.com/">MyAzureStorage.com</a> and
see how easy it is to do.
</p>
        <p>
 
</p>
        <p>
* assuming the key holder has not marked the container as blob- or container-level
public access already, in which case it is public read-only.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=40dc15bd-7fda-4229-8230-3e0833303aa6" />
      </body>
      <title>Sharing Blobs in Windows Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,40dc15bd-7fda-4229-8230-3e0833303aa6.aspx</guid>
      <link>http://dunnry.com/blog/2010/02/13/SharingBlobsInWindowsAzure.aspx</link>
      <pubDate>Sat, 13 Feb 2010 01:29:47 GMT</pubDate>
      <description>&lt;p&gt;
Windows Azure storage makes use of a symmetric key authentication system.&amp;#160; Essentially,
we take a 256-bit key and sign each HTTP request to the storage subsystem.&amp;#160; In
order to access storage, you have to prove you know the key.&amp;#160; What this means
of course is that you need to protect that key well.&amp;#160; It is an all-or-nothing
scenario, if you have the key, you can do anything.&amp;#160; If you don't possess the
key, you can do nothing*.
&lt;/p&gt;
&lt;p&gt;
The natural question for most folks when they understand this model is, how can I
grant access to someone without compromising my master key?&amp;#160; The solution turns
out to be something called Shared Access Signatures (SAS) for Windows Azure.&amp;#160;
SAS works by specifying a few query string parameters, canonicalizing those parameters,
hashing them and signing the hash in the query string.&amp;#160; This creates a unique
URL that embeds not only the required access, but the proof that it was created by
someone that knew the master key.&amp;#160; The parameters on the query string are:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;st&lt;/strong&gt; - this is the start time of when the signature becomes valid.&amp;#160;
It is optional.&amp;#160; If not supplied, then now is implied.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;se&lt;/strong&gt; - this the the expiration date and time.&amp;#160; All signatures
are timebound and this parameter is required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sr&lt;/strong&gt; - this is the resource that the signature applies to and will
be either (b)lob or (c)ontainer.&amp;#160; This is required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sp&lt;/strong&gt; -this is the permission set that you are granting - (r)ead, (w)rite,
(d)elete, and (l)ist.&amp;#160; This is required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;si&lt;/strong&gt; - this is a signed identifier or a named policy that can incorporate
any of the previous elements. Optional.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;sig&lt;/strong&gt; - this is the signed hash of the querystring and URI that proves
it was created with the master key.&amp;#160; It is required.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
There is one other caveat that is important to mention here.&amp;#160; Unless you use
a signed identifier - what I refer to as a policy - there is no way to create a signature
that has a lifetime longer than an hour.&amp;#160; This is for good reason.&amp;#160; A SAS
URL that was mistakenly created with an extremely long lifetime and without using
the signed idenifier (policy) could not be revoked without changing the master key
on the storage account.&amp;#160; If that URL was to leak, your signed resource would
be open to abuse for a potentially long time.&amp;#160; By making the longest lifetime
of a signature only an hour, we have limited the window in which you are exposed.
&lt;/p&gt;
&lt;p&gt;
If you want to create a longer-lived SAS, you must create a policy.&amp;#160; The policy
is very interesting.&amp;#160; Because this policy contains any of those parameters mentioned
above and is stored at the service, it means that we can revoke those permission or
completely change them instantly.
&lt;/p&gt;
&lt;p&gt;
Let's walk through an example using &lt;a href="http://www.myazurestorage.com"&gt;MyAzureStorage.com&lt;/a&gt;,
where it is trivial to create a SAS.&amp;#160; Once I login to the site, I am going to
select the BLOBs option from the navigation tabs on top.&amp;#160; Here I will see a list
of all my containers.&amp;#160; I can select a container's &lt;strong&gt;Actions&lt;/strong&gt; menu
and click &lt;strong&gt;Manage Policies&lt;/strong&gt;.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_thumb.png" width="504" height="439" /&gt;&lt;/a&gt;&amp;#160;
&lt;/p&gt;
&lt;p&gt;
Next, I am going to create two policies (signed identifiers), called Read and Write.&amp;#160;
These will have different expirations dates and permission sets.&amp;#160; Notice I am
not specifying a Start Date, so they are immediately valid.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_thumb_1.png" width="504" height="298" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Next, I am going to select the &lt;strong&gt;Actions&lt;/strong&gt; menu for one of the blobs
under this container and click &lt;strong&gt;Share&lt;/strong&gt;.&amp;#160; I am going to apply one
of the policies (shared access signature) that I just created by selecting it from
the dropdown.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/SharingBlobsinWindowsAzure_E158/image_thumb_2.png" width="504" height="342" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
You will notice that the value that I created in the policy fill in the values in
the&lt;strong&gt; Share BLOB&lt;/strong&gt; UI and disable you from changing them.&amp;#160; The reason
is that a policy is like a template.&amp;#160; If you don't set a value, then you can
set (or must set it if it is required).&amp;#160; However, if the policy states one of
the parameters, you cannot supply that parameter.&amp;#160; In this case, the 'read' policy
that was created specified the expiration (se) and permissions (sp).&amp;#160; It is implied
from the dialog selection that the resource (sr) is a (b)lob.&amp;#160; The only value
that could be supplied here outside of the policy is the start time (st), which I
am not supplying as it is optional.
&lt;/p&gt;
&lt;p&gt;
When I click the &lt;strong&gt;Get URL&lt;/strong&gt; button, I get back a URL that looks like
this:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;http://&amp;lt;account&amp;gt;.blob.core.windows.net/shared/blobname?sr=b&amp;amp;si=read&amp;amp;sig=hIbD%.%3D&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Now, if that URL was to leak and I no longer wanted to provide read access to the
blob, I could simply delete the 'read' policy or change the expiration date.&amp;#160;
It would instantly be invalidated.&amp;#160; Compare this to the the same signature created
without a policy:
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;http://&amp;lt;account&amp;gt;.blob.core.windows.net/shared/blobname?se=2010-02-13T02%3A17%3A46Z&amp;amp;sr=b&amp;amp;sp=r&amp;amp;sig=bYfBBb1yf.%3D&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
This signature could not be revoked until it either expired or I regenerated the master
key.
&lt;/p&gt;
&lt;p&gt;
If you want to see how the SAS feature works or easily share blobs or containers in
your Windows Azure storage account, give it a try at &lt;a href="http://www.myazurestorage.com/"&gt;MyAzureStorage.com&lt;/a&gt; and
see how easy it is to do.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
* assuming the key holder has not marked the container as blob- or container-level
public access already, in which case it is public read-only.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=40dc15bd-7fda-4229-8230-3e0833303aa6" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,40dc15bd-7fda-4229-8230-3e0833303aa6.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Server</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=b7c3a643-7347-4a56-a259-acdff347b4ae</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,b7c3a643-7347-4a56-a259-acdff347b4ae.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,b7c3a643-7347-4a56-a259-acdff347b4ae.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b7c3a643-7347-4a56-a259-acdff347b4ae</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
It wasn't too long ago when <a href="http://rhizohm.net/irhetoric/">Karsten Januszewski</a> came
to my office looking for a Windows Azure token (back when we were in CTP).  I
wondered what cool shenanigans the <a href="http://visitmix.com/About/">MIX team</a> had
going.  Turns out it was for the <a href="http://visitmix.com/labs/incarnate/">Incarnate</a> project
(<a href="http://visitmix.com/LabNotes/Incarnate-Find-and-Reuse-Your-Avatars">explained
here</a>).  In short, this service finds all the different avatars you might
be using across popular sites* and allows you to select an existing one instead of
having to upload one again and again.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/DoyouIncarnate_CB05/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/DoyouIncarnate_CB05/image_thumb_1.png" width="504" height="492" />
          </a>
        </p>
        <p>
You will note that there is another 'dunnry' somewhere on the interwebs, stealing
my exclusive trademark.  I have conveniently crossed them out for reference.
;)
</p>
        <p>
Since the entire Incarnate service is running in Windows Azure, I was interested in
Karsten's experience:
</p>
        <blockquote>
          <p>
We chose Windows Azure to host Incarnate because there was a lot of uncertainty in
traffic.  We didn't know how popular the service would be and knowing that we
could scale to any load was a big factor in choosing it.
</p>
        </blockquote>
        <p>
I asked him how the experience was, developing for Windows Azure
</p>
        <blockquote>
          <p>
There is a ton of great documentation and samples.  I relied heavily on the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78&amp;displaylang=en">Windows
Azure Platform Kit</a> as well as the samples in the SDK to get started.  Once
I understood how the development environment worked and how the deployment model functioned,
I was off and running. I'd definitely recommend those two resources as well as the <a href="http://microsoftpdc.com/Search?Term=Azure">videos
from the PDC</a> for people who are getting started.
</p>
        </blockquote>
        <p>
I love it when I hear that.  Karsten was able to get the Incarnate service up
and running on Windows Azure easily and now he is scale-proof in addition to the management
goodness that is baked into Windows Azure.
</p>
        <p>
Checkout more about Incarnate and Karsten's Windows Azure learning on the <a href="http://www.visitmix.com/writings/">MIX
blog</a>.
</p>
        <p>
 
</p>
        <p>
*turns out you can extend this to add a provider for any site (not just the ones that
ship in source).
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=b7c3a643-7347-4a56-a259-acdff347b4ae" />
      </body>
      <title>Do you Incarnate?</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,b7c3a643-7347-4a56-a259-acdff347b4ae.aspx</guid>
      <link>http://dunnry.com/blog/2010/02/10/DoYouIncarnate.aspx</link>
      <pubDate>Wed, 10 Feb 2010 21:19:16 GMT</pubDate>
      <description>&lt;p&gt;
It wasn't too long ago when &lt;a href="http://rhizohm.net/irhetoric/"&gt;Karsten Januszewski&lt;/a&gt; came
to my office looking for a Windows Azure token (back when we were in CTP).&amp;#160; I
wondered what cool shenanigans the &lt;a href="http://visitmix.com/About/"&gt;MIX team&lt;/a&gt; had
going.&amp;#160; Turns out it was for the &lt;a href="http://visitmix.com/labs/incarnate/"&gt;Incarnate&lt;/a&gt; project
(&lt;a href="http://visitmix.com/LabNotes/Incarnate-Find-and-Reuse-Your-Avatars"&gt;explained
here&lt;/a&gt;).&amp;#160; In short, this service finds all the different avatars you might
be using across popular sites* and allows you to select an existing one instead of
having to upload one again and again.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/DoyouIncarnate_CB05/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/DoyouIncarnate_CB05/image_thumb_1.png" width="504" height="492" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
You will note that there is another 'dunnry' somewhere on the interwebs, stealing
my exclusive trademark.&amp;#160; I have conveniently crossed them out for reference.
;)
&lt;/p&gt;
&lt;p&gt;
Since the entire Incarnate service is running in Windows Azure, I was interested in
Karsten's experience:
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
We chose Windows Azure to host Incarnate because there was a lot of uncertainty in
traffic.&amp;#160; We didn't know how popular the service would be and knowing that we
could scale to any load was a big factor in choosing it.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
I asked him how the experience was, developing for Windows Azure
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
There is a ton of great documentation and samples.&amp;#160; I relied heavily on the &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78&amp;amp;displaylang=en"&gt;Windows
Azure Platform Kit&lt;/a&gt; as well as the samples in the SDK to get started.&amp;#160; Once
I understood how the development environment worked and how the deployment model functioned,
I was off and running. I'd definitely recommend those two resources as well as the &lt;a href="http://microsoftpdc.com/Search?Term=Azure"&gt;videos
from the PDC&lt;/a&gt; for people who are getting started.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
I love it when I hear that.&amp;#160; Karsten was able to get the Incarnate service up
and running on Windows Azure easily and now he is scale-proof in addition to the management
goodness that is baked into Windows Azure.
&lt;/p&gt;
&lt;p&gt;
Checkout more about Incarnate and Karsten's Windows Azure learning on the &lt;a href="http://www.visitmix.com/writings/"&gt;MIX
blog&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
*turns out you can extend this to add a provider for any site (not just the ones that
ship in source).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=b7c3a643-7347-4a56-a259-acdff347b4ae" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,b7c3a643-7347-4a56-a259-acdff347b4ae.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=7ed8cbd1-2104-475f-94d6-a1451169c873</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,7ed8cbd1-2104-475f-94d6-a1451169c873.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,7ed8cbd1-2104-475f-94d6-a1451169c873.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=7ed8cbd1-2104-475f-94d6-a1451169c873</wfw:commentRss>
      <slash:comments>6</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
This might come as a surprise to some folks, but in Windows Azure you are billed when
you deploy, not when you run.  That means we don't care about CPU hours - we
care about deployed hours.  Your meter starts the second you deploy, irrespective
of the state of the application.  This means that even if you 'Suspend' your
service so it is not reachable (and consumes no CPU), the meter is still running.
</p>
        <p>
Visually, here is the meter still running:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/HowDoIStoptheBillingMeterinWindowsAzure_A88E/image_4.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/HowDoIStoptheBillingMeterinWindowsAzure_A88E/image_thumb_1.png" width="504" height="233" />
          </a>
        </p>
        <p>
Here is when the meter is stopped:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/HowDoIStoptheBillingMeterinWindowsAzure_A88E/image_6.png">
            <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/HowDoIStoptheBillingMeterinWindowsAzure_A88E/image_thumb_2.png" width="504" height="196" />
          </a>
        </p>
        <p>
Right now, there is a 'free' offering of Windows Azure that offers a limited # of
hours per month.  If you are using MSDN benefits for Windows Azure, there is
another offering that offers some bucket of 'free' hours.  Any overage and you
start to pay.
</p>
        <p>
Now, if you are like me and have a fair number of hosted services squirreled around,
you might forget to go to the portal and delete the deployments when you are done. 
Or, you might simply wish to automate the removal of your deployments at the end of
day.  There are lots of reasons to remove your deployments, but the primary one
is to turn the meter off.  Given that re-deploying your services is very simple
(and can also be automated), this is not a huge issue to remove the deployment when
you are done.
</p>
        <h2>Automatic Service Removal
</h2>
        <p>
For those folks that wish an automated solution, it turns out that this is amazingly
simple when using the Service Management API and the <a href="http://code.msdn.microsoft.com/azurecmdlets">Azure
cmdlets</a>.  Here is the complete, deployment-nuking script:
</p>
        <code>
          <p>
$cert = Get-Item cert:\CurrentUser\My\&lt;cert thumbprint&gt; 
<br />
$sub = 'CCCEA07B. your sub ID' 
</p>
          <p>
$services = Get-HostedServices -Certificate $cert -SubscriptionId $sub 
</p>
          <p>
$services | Get-Deployment -Slot Production | Set-DeploymentStatus 'Suspended' | Get-OperationStatus
-WaitToComplete 
<br />
$services | Get-Deployment -Slot Staging | Set-DeploymentStatus 'Suspended' | Get-OperationStatus
-WaitToComplete 
</p>
          <p>
$services | Get-Deployment -Slot Production | Remove-Deployment 
<br />
$services | Get-Deployment -Slot Staging | Remove-Deployment
</p>
          <p>
          </p>
        </code>
        <p>
That's it - just 6 lines of Powershell. BE CAREFUL.  This script will iterate
through all the services in your subscription ID, stop any deployed service, and then
remove it.  After this runs, every hosted service will be gone and the billing
meter has stopped (for hosted services anyway).
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=7ed8cbd1-2104-475f-94d6-a1451169c873" />
      </body>
      <title>How Do I Stop the Billing Meter in Windows Azure?</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,7ed8cbd1-2104-475f-94d6-a1451169c873.aspx</guid>
      <link>http://dunnry.com/blog/2010/02/03/HowDoIStopTheBillingMeterInWindowsAzure.aspx</link>
      <pubDate>Wed, 03 Feb 2010 20:00:11 GMT</pubDate>
      <description>&lt;p&gt;
This might come as a surprise to some folks, but in Windows Azure you are billed when
you deploy, not when you run.&amp;#160; That means we don't care about CPU hours - we
care about deployed hours.&amp;#160; Your meter starts the second you deploy, irrespective
of the state of the application.&amp;#160; This means that even if you 'Suspend' your
service so it is not reachable (and consumes no CPU), the meter is still running.
&lt;/p&gt;
&lt;p&gt;
Visually, here is the meter still running:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/HowDoIStoptheBillingMeterinWindowsAzure_A88E/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/HowDoIStoptheBillingMeterinWindowsAzure_A88E/image_thumb_1.png" width="504" height="233" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Here is when the meter is stopped:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/HowDoIStoptheBillingMeterinWindowsAzure_A88E/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/HowDoIStoptheBillingMeterinWindowsAzure_A88E/image_thumb_2.png" width="504" height="196" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
Right now, there is a 'free' offering of Windows Azure that offers a limited # of
hours per month.&amp;#160; If you are using MSDN benefits for Windows Azure, there is
another offering that offers some bucket of 'free' hours.&amp;#160; Any overage and you
start to pay.
&lt;/p&gt;
&lt;p&gt;
Now, if you are like me and have a fair number of hosted services squirreled around,
you might forget to go to the portal and delete the deployments when you are done.&amp;#160;
Or, you might simply wish to automate the removal of your deployments at the end of
day.&amp;#160; There are lots of reasons to remove your deployments, but the primary one
is to turn the meter off.&amp;#160; Given that re-deploying your services is very simple
(and can also be automated), this is not a huge issue to remove the deployment when
you are done.
&lt;/p&gt;
&lt;h2&gt;Automatic Service Removal
&lt;/h2&gt;
&lt;p&gt;
For those folks that wish an automated solution, it turns out that this is amazingly
simple when using the Service Management API and the &lt;a href="http://code.msdn.microsoft.com/azurecmdlets"&gt;Azure
cmdlets&lt;/a&gt;.&amp;#160; Here is the complete, deployment-nuking script:
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
$cert = Get-Item cert:\CurrentUser\My\&amp;lt;cert thumbprint&amp;gt; 
&lt;br /&gt;
$sub = 'CCCEA07B. your sub ID' 
&lt;/p&gt;
&lt;p&gt;
$services = Get-HostedServices -Certificate $cert -SubscriptionId $sub 
&lt;/p&gt;
&lt;p&gt;
$services | Get-Deployment -Slot Production | Set-DeploymentStatus 'Suspended' | Get-OperationStatus
-WaitToComplete 
&lt;br /&gt;
$services | Get-Deployment -Slot Staging | Set-DeploymentStatus 'Suspended' | Get-OperationStatus
-WaitToComplete 
&lt;/p&gt;
&lt;p&gt;
$services | Get-Deployment -Slot Production | Remove-Deployment 
&lt;br /&gt;
$services | Get-Deployment -Slot Staging | Remove-Deployment
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
That's it - just 6 lines of Powershell. BE CAREFUL.&amp;#160; This script will iterate
through all the services in your subscription ID, stop any deployed service, and then
remove it.&amp;#160; After this runs, every hosted service will be gone and the billing
meter has stopped (for hosted services anyway).
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=7ed8cbd1-2104-475f-94d6-a1451169c873" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,7ed8cbd1-2104-475f-94d6-a1451169c873.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Tips</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=7f196fcb-9032-4a1e-afe0-1dddb6211dc9</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,7f196fcb-9032-4a1e-afe0-1dddb6211dc9.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,7f196fcb-9032-4a1e-afe0-1dddb6211dc9.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=7f196fcb-9032-4a1e-afe0-1dddb6211dc9</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
A few customers have asked how they can use tools like <a href="http://code.msdn.microsoft.com/wazt">wazt</a>, <a href="http://code.msdn.microsoft.com/windowsazuremmc">Windows
Azure MMC</a>, the <a href="http://code.msdn.microsoft.com/azurecmdlets">Azure Cmdlets</a>,
etc. when they are behind proxies at work that require basic authentication. 
The tools themselves don't directly support this type of proxy.  What we are
doing is simply relying on the fact that the underlying HttpRequest object will pick
up your IE's default proxy configuration.  Most of the time, this just works.
</p>
        <p>
However, if you are in an environment where you are prompted for your username and
password, you might be on a basic auth proxy and the tools might not work.  To
work around this, you can actually implement a very simple proxy handler yourself
and inject it into the application.
</p>
        <p>
Here is one that I wrote to support wazt.  To use this, add the following to
your app.config and drop the output assembly from this project into your execution
directory.  Note, this would work with any tool in .NET that uses HttpWebRequest
under the covers (like csmanage for instance).
</p>
        <p>
 
</p>
        <p>
&lt;!-- basic auth proxy section declaration area--&gt; 
<br />
&lt;!-- proxyHostAddress="Auto" : use Internet explorer configuration for
name of the proxy --&gt; 
<br />
&lt;configSections&gt; 
<br />
  &lt;sectionGroup name="proxyGroup"&gt; 
<br />
    &lt;section name="basicProxy" 
<br />
             type="Proxy.Configuration.CustomProxySection,
Proxy" /&gt; 
<br />
  &lt;/sectionGroup&gt; 
<br />
&lt;/configSections&gt; 
</p>
        <p>
&lt;system.net&gt; 
<br />
  &lt;defaultProxy enabled="true" useDefaultCredentials="false"&gt; 
<br />
    &lt;module type="Proxy.CustomProxy, Proxy"/&gt; 
<br />
  &lt;/defaultProxy&gt; 
<br />
&lt;/system.net&gt; 
</p>
        <p>
&lt;proxyGroup&gt;    
<br />
  &lt;basicProxy proxyHostAddress="Auto" proxyUserName="MyName"
proxyUserPassword="MyPassword" /&gt; 
<br />
&lt;/proxyGroup&gt;
</p>
        <p>
 
</p>
        <p>
          <a href="http://cid-4225352e17899c6d.office.live.com/self.aspx/Public/Proxy.zip" target="_blank">Download
the source here</a>.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=7f196fcb-9032-4a1e-afe0-1dddb6211dc9" />
      </body>
      <title>Supporting Basic Auth Proxies</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,7f196fcb-9032-4a1e-afe0-1dddb6211dc9.aspx</guid>
      <link>http://dunnry.com/blog/2010/01/25/SupportingBasicAuthProxies.aspx</link>
      <pubDate>Mon, 25 Jan 2010 23:52:35 GMT</pubDate>
      <description>&lt;p&gt;
A few customers have asked how they can use tools like &lt;a href="http://code.msdn.microsoft.com/wazt"&gt;wazt&lt;/a&gt;, &lt;a href="http://code.msdn.microsoft.com/windowsazuremmc"&gt;Windows
Azure MMC&lt;/a&gt;, the &lt;a href="http://code.msdn.microsoft.com/azurecmdlets"&gt;Azure Cmdlets&lt;/a&gt;,
etc. when they are behind proxies at work that require basic authentication.&amp;#160;
The tools themselves don't directly support this type of proxy.&amp;#160; What we are
doing is simply relying on the fact that the underlying HttpRequest object will pick
up your IE's default proxy configuration.&amp;#160; Most of the time, this just works.
&lt;/p&gt;
&lt;p&gt;
However, if you are in an environment where you are prompted for your username and
password, you might be on a basic auth proxy and the tools might not work.&amp;#160; To
work around this, you can actually implement a very simple proxy handler yourself
and inject it into the application.
&lt;/p&gt;
&lt;p&gt;
Here is one that I wrote to support wazt.&amp;#160; To use this, add the following to
your app.config and drop the output assembly from this project into your execution
directory.&amp;#160; Note, this would work with any tool in .NET that uses HttpWebRequest
under the covers (like csmanage for instance).
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&amp;lt;!-- basic auth proxy section declaration area--&amp;gt; 
&lt;br /&gt;
&amp;lt;!-- proxyHostAddress=&amp;quot;Auto&amp;quot; : use Internet explorer configuration for
name of the proxy --&amp;gt; 
&lt;br /&gt;
&amp;lt;configSections&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;sectionGroup name=&amp;quot;proxyGroup&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;section name=&amp;quot;basicProxy&amp;quot; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; type=&amp;quot;Proxy.Configuration.CustomProxySection,
Proxy&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;/sectionGroup&amp;gt; 
&lt;br /&gt;
&amp;lt;/configSections&amp;gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;lt;system.net&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;defaultProxy enabled=&amp;quot;true&amp;quot; useDefaultCredentials=&amp;quot;false&amp;quot;&amp;gt; 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; &amp;lt;module type=&amp;quot;Proxy.CustomProxy, Proxy&amp;quot;/&amp;gt; 
&lt;br /&gt;
&amp;#160; &amp;lt;/defaultProxy&amp;gt; 
&lt;br /&gt;
&amp;lt;/system.net&amp;gt; 
&lt;/p&gt;
&lt;p&gt;
&amp;lt;proxyGroup&amp;gt;&amp;#160;&amp;#160;&amp;#160; 
&lt;br /&gt;
&amp;#160; &amp;lt;basicProxy proxyHostAddress=&amp;quot;Auto&amp;quot; proxyUserName=&amp;quot;MyName&amp;quot;
proxyUserPassword=&amp;quot;MyPassword&amp;quot; /&amp;gt; 
&lt;br /&gt;
&amp;lt;/proxyGroup&amp;gt;
&lt;/p&gt;
&lt;p&gt;
&amp;#160;
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://cid-4225352e17899c6d.office.live.com/self.aspx/Public/Proxy.zip" target="_blank"&gt;Download
the source here&lt;/a&gt;.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=7f196fcb-9032-4a1e-afe0-1dddb6211dc9" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,7f196fcb-9032-4a1e-afe0-1dddb6211dc9.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Tips</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=55186781-9917-45e5-8a34-0eb8d0be3356</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,55186781-9917-45e5-8a34-0eb8d0be3356.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,55186781-9917-45e5-8a34-0eb8d0be3356.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=55186781-9917-45e5-8a34-0eb8d0be3356</wfw:commentRss>
      <slash:comments>2</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
I love elegant software.  I knew about <a href="http://clumsyleaf.com/products/cloudxplorer">CloudXplorer</a> from
Clumsy Leaf for some time, but I hadn't used it for awhile because the <a href="http://code.msdn.microsoft.com/windowsazuremmc">Windows
Azure MMC</a> and <a href="https://www.myazurestorage.com">MyAzureStorage.com</a> have
been all I need for storage for awhile.  Also, I have a private tool that I wrote
awhile back to generate Shared Access signatures for files I want to share.
</p>
        <p>
I decided to check out the progress on this tool and noticed in the change log that
support for Shared Access signatures is now included.  Nice!  So far, this
is the only tool* that I have seen handle Shared Access signatures in such an elegant
and complete manner.  Nicely done!
</p>
        <p>
Definitely a recommended tool to keep on your shortlist.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/NeatWindowsAzureStorageTool_CD5D/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/NeatWindowsAzureStorageTool_CD5D/image_thumb.png" width="349" height="171" />
          </a>
        </p>
        <p>
*My tool is complete, but not nearly as elegant.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=55186781-9917-45e5-8a34-0eb8d0be3356" />
      </body>
      <title>Neat Windows Azure Storage Tool</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,55186781-9917-45e5-8a34-0eb8d0be3356.aspx</guid>
      <link>http://dunnry.com/blog/2010/01/25/NeatWindowsAzureStorageTool.aspx</link>
      <pubDate>Mon, 25 Jan 2010 22:41:05 GMT</pubDate>
      <description>&lt;p&gt;
I love elegant software.&amp;#160; I knew about &lt;a href="http://clumsyleaf.com/products/cloudxplorer"&gt;CloudXplorer&lt;/a&gt; from
Clumsy Leaf for some time, but I hadn't used it for awhile because the &lt;a href="http://code.msdn.microsoft.com/windowsazuremmc"&gt;Windows
Azure MMC&lt;/a&gt; and &lt;a href="https://www.myazurestorage.com"&gt;MyAzureStorage.com&lt;/a&gt; have
been all I need for storage for awhile.&amp;#160; Also, I have a private tool that I wrote
awhile back to generate Shared Access signatures for files I want to share.
&lt;/p&gt;
&lt;p&gt;
I decided to check out the progress on this tool and noticed in the change log that
support for Shared Access signatures is now included.&amp;#160; Nice!&amp;#160; So far, this
is the only tool* that I have seen handle Shared Access signatures in such an elegant
and complete manner.&amp;#160; Nicely done!
&lt;/p&gt;
&lt;p&gt;
Definitely a recommended tool to keep on your shortlist.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/NeatWindowsAzureStorageTool_CD5D/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/NeatWindowsAzureStorageTool_CD5D/image_thumb.png" width="349" height="171" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
*My tool is complete, but not nearly as elegant.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=55186781-9917-45e5-8a34-0eb8d0be3356" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,55186781-9917-45e5-8a34-0eb8d0be3356.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=91a03722-0ca6-4190-8d2f-d3e875d04490</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,91a03722-0ca6-4190-8d2f-d3e875d04490.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,91a03722-0ca6-4190-8d2f-d3e875d04490.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=91a03722-0ca6-4190-8d2f-d3e875d04490</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Some time back, I put in a request to LINQPad's <a href="http://linqpad.uservoice.com/forums/18302-linqpad-feature-suggestions">feature
request page</a> to support SQL Azure.  I love using LINQPad for basically all
my quick demo programs and prototypes.  Since all I work with these days is the
Windows Azure platform, it was killing me to have to go to SSMS to do anything with
SQL Azure.
</p>
        <p>
Well, my request was granted!  Today, you can use the <a href="http://www.linqpad.net/beta.aspx">beta
version</a> of LINQPad against SQL Azure and get the full LINQ experience.  Behold:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LINQPadsupportsSQLAzure_1044A/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LINQPadsupportsSQLAzure_1044A/image_thumb.png" width="504" height="435" />
          </a>
        </p>
        <p>
In this case, I am querying the firewall rules on my database using LINQ.  Hot
damn.  Nice work Joe!  If you pay a few bucks, you get the intellisense
version of the tool too, which is well worth it.  This tool has completely replaced
SnippetCompiler for me and continues to get better and better.  Now, if Joe would
add F# support.
</p>
        <p>
          <a href="http://www.linqpad.net/beta.aspx">LINQPad Beta</a>
        </p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=91a03722-0ca6-4190-8d2f-d3e875d04490" />
      </body>
      <title>LINQPad supports SQL Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,91a03722-0ca6-4190-8d2f-d3e875d04490.aspx</guid>
      <link>http://dunnry.com/blog/2010/01/12/LINQPadSupportsSQLAzure.aspx</link>
      <pubDate>Tue, 12 Jan 2010 02:31:14 GMT</pubDate>
      <description>&lt;p&gt;
Some time back, I put in a request to LINQPad's &lt;a href="http://linqpad.uservoice.com/forums/18302-linqpad-feature-suggestions"&gt;feature
request page&lt;/a&gt; to support SQL Azure.&amp;#160; I love using LINQPad for basically all
my quick demo programs and prototypes.&amp;#160; Since all I work with these days is the
Windows Azure platform, it was killing me to have to go to SSMS to do anything with
SQL Azure.
&lt;/p&gt;
&lt;p&gt;
Well, my request was granted!&amp;#160; Today, you can use the &lt;a href="http://www.linqpad.net/beta.aspx"&gt;beta
version&lt;/a&gt; of LINQPad against SQL Azure and get the full LINQ experience.&amp;#160; Behold:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LINQPadsupportsSQLAzure_1044A/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LINQPadsupportsSQLAzure_1044A/image_thumb.png" width="504" height="435" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
In this case, I am querying the firewall rules on my database using LINQ.&amp;#160; Hot
damn.&amp;#160; Nice work Joe!&amp;#160; If you pay a few bucks, you get the intellisense
version of the tool too, which is well worth it.&amp;#160; This tool has completely replaced
SnippetCompiler for me and continues to get better and better.&amp;#160; Now, if Joe would
add F# support.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://www.linqpad.net/beta.aspx"&gt;LINQPad Beta&lt;/a&gt;
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=91a03722-0ca6-4190-8d2f-d3e875d04490" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,91a03722-0ca6-4190-8d2f-d3e875d04490.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>LINQ</category>
      <category>Tools</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=917a2ca7-83ce-45a0-82e9-a8b6d23ddf45</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,917a2ca7-83ce-45a0-82e9-a8b6d23ddf45.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,917a2ca7-83ce-45a0-82e9-a8b6d23ddf45.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=917a2ca7-83ce-45a0-82e9-a8b6d23ddf45</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
For those of you that made PDC, this will serve as a reminder and for those of you
that missed PDC this year (too bad!), this will serve as a guide to some great content.
</p>
        <h2>PDC Sessions for the Windows Azure Platform
</h2>
        <h3>Getting Started
</h3>
        <ul>
          <li>
            <a href="http://microsoftpdc.com/Sessions/P09-03">Lap Around the Windows Azure Platform</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC13">Windows Azure Present and Future</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC37">Introduction to Building Applications
with Windows Azure</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC54">The Business of Windows Azure: What
you should know about Windows Azure Platform pricing and SLAs</a>
          </li>
        </ul>
        <h3>Windows Azure
</h3>
        <ul>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC08">Patterns for Building Scalable and
Reliable Applications with Windows Azure</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC16">Developing Advanced Applications
with Windows Azure</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC15">Windows Azure Monitoring, Logging,
and Management APIs</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC25">Automating the Application Lifecycle
with Windows Azure</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC18">Building Hybrid Cloud Applications
with Windows Azure and the Service Bus</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC17">Enabling Single Sign-On to Windows
Azure Applications</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC20">Bridging the Gap from On-Premises
to the Cloud</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC53">Tips and Tricks for Using Visual
Studio 2010 to Build Applications that Run on Windows Azure </a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC14">Storing and Manipulating Blobs and
Files with Windows Azure Storage</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC09">Windows Azure Tables and Queues Deep
Dive</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC51">Developing PHP and MySQL Applications
with Windows Azure</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC50">Building Java Applications with Windows
Azure</a>
          </li>
        </ul>
        <h3>Codename "Dallas"
</h3>
        <ul>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC29">Enrich your Applications with Data
from Microsoft Project Code Name "Dallas"</a>
          </li>
        </ul>
        <h3>SQL Azure
</h3>
        <ul>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC52">SQL Azure Database: Present and Future</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC23">Using the Microsoft Sync Framework
to Connect Apps to the Cloud</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC27">The Future of Database Development
with SQL Azure</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC12">Microsoft SQL Azure Database: Under
the Hood</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC06">Scaling out Web Applications with
Microsoft SQL Azure Databases</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/P09-14">Petabytes for Peanuts! Making Sense
out of "Ambient" Data</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/P09-08">Development Best Practices and Patterns
for Using Microsoft SQL Azure Databases</a>
          </li>
        </ul>
        <h3>Identity
</h3>
        <ul>
          <li>
            <a href="http://microsoftpdc.com/Sessions/P09-21">Windows Identity Foundation Overview</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC10">Software + Services Identity Roadmap
Update</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC17">Enabling Single Sign-On to Windows
Azure Applications</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC19">REST Services Security Using the
Access Control Service</a>
            <strong>
            </strong>
          </li>
        </ul>
        <h3>Customer &amp; Partner Showcases
</h3>
        <ul>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC32">Lessons Learned: Building Scalable
Applications with the Windows Azure Platform</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC31">Lessons Learned: Building On-Premises
and Cloud Applications with the Service Bus and Windows Azure</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC33">Lessons Learned: Building Multi-Tenant
Applications with the Windows Azure Platform</a>
          </li>
          <li>
            <a href="http://microsoftpdc.com/Sessions/SVC22">Lessons Learned: Migrating Applications
to the Windows Azure Platform</a>
          </li>
        </ul>
        <h2>Channel 9 Learning Centers
</h2>
        <p>
Coinciding with PDC, we have released the first wave of learning content on Channel
9. The new Ch9 learning centers features content for both the <a href="http://channel9.msdn.com/learn/courses/azure">Windows
Azure Platform</a>, as well as a course specifically designed for the <a href="http://channel9.msdn.com/learn/courses/IdentityTrainingCourse/">Identity
Developer</a>. The content on both these sites will be continued to be developed by
the team over the coming weeks and months. Watch out for updates and additions.
</p>
        <h2>Downloadable Training Kits
</h2>
        <p>
To complement the learning centers on Ch9, we still continue to maintain the training
kits on the Microsoft download center, which allows you to download and consume the
content offline. You can download the Windows Azure Platform training kit <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78">here</a>,
and the Identity training kit <a href="http://go.microsoft.com/fwlink/?LinkId=148795">here</a>.
The next update is planned for mid-December.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=917a2ca7-83ce-45a0-82e9-a8b6d23ddf45" />
      </body>
      <title>PDC 2009 Windows Azure Resources</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,917a2ca7-83ce-45a0-82e9-a8b6d23ddf45.aspx</guid>
      <link>http://dunnry.com/blog/2009/11/23/PDC2009WindowsAzureResources.aspx</link>
      <pubDate>Mon, 23 Nov 2009 17:51:28 GMT</pubDate>
      <description>&lt;p&gt;
For those of you that made PDC, this will serve as a reminder and for those of you
that missed PDC this year (too bad!), this will serve as a guide to some great content.
&lt;/p&gt;
&lt;h2&gt;PDC Sessions for the Windows Azure Platform
&lt;/h2&gt;
&lt;h3&gt;Getting Started
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/P09-03"&gt;Lap Around the Windows Azure Platform&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC13"&gt;Windows Azure Present and Future&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC37"&gt;Introduction to Building Applications
with Windows Azure&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC54"&gt;The Business of Windows Azure: What
you should know about Windows Azure Platform pricing and SLAs&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Windows Azure
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC08"&gt;Patterns for Building Scalable and
Reliable Applications with Windows Azure&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC16"&gt;Developing Advanced Applications
with Windows Azure&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC15"&gt;Windows Azure Monitoring, Logging,
and Management APIs&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC25"&gt;Automating the Application Lifecycle
with Windows Azure&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC18"&gt;Building Hybrid Cloud Applications
with Windows Azure and the Service Bus&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC17"&gt;Enabling Single Sign-On to Windows
Azure Applications&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC20"&gt;Bridging the Gap from On-Premises
to the Cloud&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC53"&gt;Tips and Tricks for Using Visual
Studio 2010 to Build Applications that Run on Windows Azure &lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC14"&gt;Storing and Manipulating Blobs and
Files with Windows Azure Storage&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC09"&gt;Windows Azure Tables and Queues Deep
Dive&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC51"&gt;Developing PHP and MySQL Applications
with Windows Azure&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC50"&gt;Building Java Applications with Windows
Azure&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Codename "Dallas"
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC29"&gt;Enrich your Applications with Data
from Microsoft Project Code Name "Dallas"&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;SQL Azure
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC52"&gt;SQL Azure Database: Present and Future&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC23"&gt;Using the Microsoft Sync Framework
to Connect Apps to the Cloud&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC27"&gt;The Future of Database Development
with SQL Azure&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC12"&gt;Microsoft SQL Azure Database: Under
the Hood&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC06"&gt;Scaling out Web Applications with
Microsoft SQL Azure Databases&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/P09-14"&gt;Petabytes for Peanuts! Making Sense
out of "Ambient" Data&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/P09-08"&gt;Development Best Practices and Patterns
for Using Microsoft SQL Azure Databases&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Identity
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/P09-21"&gt;Windows Identity Foundation Overview&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC10"&gt;Software + Services Identity Roadmap
Update&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC17"&gt;Enabling Single Sign-On to Windows
Azure Applications&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC19"&gt;REST Services Security Using the
Access Control Service&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Customer &amp;amp; Partner Showcases
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC32"&gt;Lessons Learned: Building Scalable
Applications with the Windows Azure Platform&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC31"&gt;Lessons Learned: Building On-Premises
and Cloud Applications with the Service Bus and Windows Azure&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC33"&gt;Lessons Learned: Building Multi-Tenant
Applications with the Windows Azure Platform&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://microsoftpdc.com/Sessions/SVC22"&gt;Lessons Learned: Migrating Applications
to the Windows Azure Platform&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Channel 9 Learning Centers
&lt;/h2&gt;
&lt;p&gt;
Coinciding with PDC, we have released the first wave of learning content on Channel
9. The new Ch9 learning centers features content for both the &lt;a href="http://channel9.msdn.com/learn/courses/azure"&gt;Windows
Azure Platform&lt;/a&gt;, as well as a course specifically designed for the &lt;a href="http://channel9.msdn.com/learn/courses/IdentityTrainingCourse/"&gt;Identity
Developer&lt;/a&gt;. The content on both these sites will be continued to be developed by
the team over the coming weeks and months. Watch out for updates and additions.
&lt;/p&gt;
&lt;h2&gt;Downloadable Training Kits
&lt;/h2&gt;
&lt;p&gt;
To complement the learning centers on Ch9, we still continue to maintain the training
kits on the Microsoft download center, which allows you to download and consume the
content offline. You can download the Windows Azure Platform training kit &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=413E88F8-5966-4A83-B309-53B7B77EDF78"&gt;here&lt;/a&gt;,
and the Identity training kit &lt;a href="http://go.microsoft.com/fwlink/?LinkId=148795"&gt;here&lt;/a&gt;.
The next update is planned for mid-December.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=917a2ca7-83ce-45a0-82e9-a8b6d23ddf45" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,917a2ca7-83ce-45a0-82e9-a8b6d23ddf45.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=a4c8084f-de9b-4074-b2e9-5137453466f1</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,a4c8084f-de9b-4074-b2e9-5137453466f1.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,a4c8084f-de9b-4074-b2e9-5137453466f1.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=a4c8084f-de9b-4074-b2e9-5137453466f1</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
As I write this, I am sitting on a plane headed back to the US from a wonderful visit
over to our UK office.  While there, I got to meet a number of customers working
with Windows Azure.  It was clear from the interaction that these folks were
looking for a way to simplify how to manage their deployments and build it into an
automated process.
</p>
        <p>
With the release of the <a href="http://blogs.msdn.com/windowsazure/archive/2009/09/17/introducing-the-windows-azure-service-management-api.aspx">Service
Management API</a>, this is now possible.  As of today, you can <a href="http://code.msdn.microsoft.com/azurecmdlets">download
some Powershell cmdlets</a> that wrap this API and make managing your Windows Azure
applications simple from script.  With these cmdlets, you can script your deploys,
upgrades, and scaling operations very easily.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureServiceManagementCmdLets_757C/clip_image001_2.jpg">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureServiceManagementCmdLets_757C/clip_image001_thumb.jpg" width="504" height="242" />
          </a>
        </p>
        <p>
The cmdlets mirror the API quite closely, but since it is Powershell, we support piping
which cuts down quite a bit on the things you need to type.  As an example, here
is how we can take an existing deployment, stop it, remove it, create a new deployment,
and start it:
</p>
        <code>
          <p>
Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub | 
<br />
    Get-Deployment -Slot Production | 
<br />
    Set-DeploymentStatus 'Suspended' | 
<br />
    Get-OperationStatus -WaitToComplete | 
</p>
          <p>
Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub | 
<br />
    Get-Deployment -Slot Production | 
<br />
    Remove-Deployment | 
<br />
    Get-OperationStatus -WaitToComplete
</p>
          <p>
Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub | 
<br />
    New-Deployment Production $package $config -Label 'v.Next' | 
<br />
    Get-OperationStatus -WaitToComplete
</p>
          <p>
Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub | 
<br />
    Get-Deployment -Slot Production | 
<br />
    Set-DeploymentStatus 'Running' | 
<br />
    Get-OperationStatus -WaitToComplete
</p>
        </code>
        <p>
Notice that in each case, we are first getting our service by passing in the certificate
and our subscription ID.  Again, since this is Powershell, we can get the certificate
quite easily:
</p>
        <code>$cert = Get-Item cert:\CurrentUser\My\D6BE55AC428FAC6CDEBAFF432BDC0780F1BD00CF</code>
        <p>
You will find your Subscription ID on the portal under the 'Account' tab.  Note
that we are breaking up the steps by using the <strong><em>Get-OperationStatus</em></strong> cmdlet
and having it block until it completes.  This is because the Service Management
API is an asynchronous model.
</p>
        <p>
Similarly, here is a script that will upgrade a single role or the entire deployment
depending on the arguments passed to it:
</p>
        <code>
          <p>
$label = 'nolabel' 
<br />
$role = '' 
</p>
          <p>
if ($args.Length -eq 2) 
<br />
{ 
<br />
    $role = $args[0] 
<br />
    $label = $args[1] 
<br />
} 
</p>
          <p>
if ($args.Length -eq 1) 
<br />
{ 
<br />
    $label = $args[0] 
<br />
} 
</p>
          <p>
if ($role -ne '') 
<br />
{ 
<br />
    Get-HostedService $servicename -Certificate $cert -SubscriptionId
$sub | 
<br />
    Get-Deployment -Slot Production | 
<br />
    Set-Deployment -mode Auto -roleName $role -package $package -label
$label | 
<br />
    Get-OperationStatus -WaitToComplete 
<br />
} 
<br />
else 
<br />
{ 
<br />
    Get-HostedService $servicename -Certificate $cert -SubscriptionId
$sub | 
<br />
    Get-Deployment -Slot Production | 
<br />
    Set-Deployment -mode Auto -package $package -label $label | 
<br />
    Get-OperationStatus -WaitToComplete 
<br />
}
</p>
        </code>
        <p>
          <a href="http://code.msdn.microsoft.com/azurecmdlets">Download the cmdlets from Code
Gallery</a> and leave me some feedback if you like them or if they are not working
for you.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=a4c8084f-de9b-4074-b2e9-5137453466f1" />
      </body>
      <title>Windows Azure Service Management CmdLets</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,a4c8084f-de9b-4074-b2e9-5137453466f1.aspx</guid>
      <link>http://dunnry.com/blog/2009/10/26/WindowsAzureServiceManagementCmdLets.aspx</link>
      <pubDate>Mon, 26 Oct 2009 16:26:16 GMT</pubDate>
      <description>&lt;p&gt;
As I write this, I am sitting on a plane headed back to the US from a wonderful visit
over to our UK office.&amp;#160; While there, I got to meet a number of customers working
with Windows Azure.&amp;#160; It was clear from the interaction that these folks were
looking for a way to simplify how to manage their deployments and build it into an
automated process.
&lt;/p&gt;
&lt;p&gt;
With the release of the &lt;a href="http://blogs.msdn.com/windowsazure/archive/2009/09/17/introducing-the-windows-azure-service-management-api.aspx"&gt;Service
Management API&lt;/a&gt;, this is now possible.&amp;#160; As of today, you can &lt;a href="http://code.msdn.microsoft.com/azurecmdlets"&gt;download
some Powershell cmdlets&lt;/a&gt; that wrap this API and make managing your Windows Azure
applications simple from script.&amp;#160; With these cmdlets, you can script your deploys,
upgrades, and scaling operations very easily.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureServiceManagementCmdLets_757C/clip_image001_2.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/WindowsAzureServiceManagementCmdLets_757C/clip_image001_thumb.jpg" width="504" height="242" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
The cmdlets mirror the API quite closely, but since it is Powershell, we support piping
which cuts down quite a bit on the things you need to type.&amp;#160; As an example, here
is how we can take an existing deployment, stop it, remove it, create a new deployment,
and start it:
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-Deployment -Slot Production | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Set-DeploymentStatus 'Suspended' | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-OperationStatus -WaitToComplete | 
&lt;/p&gt;
&lt;p&gt;
Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-Deployment -Slot Production | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Remove-Deployment | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-OperationStatus -WaitToComplete
&lt;/p&gt;
&lt;p&gt;
Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; New-Deployment Production $package $config -Label 'v.Next' | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-OperationStatus -WaitToComplete
&lt;/p&gt;
&lt;p&gt;
Get-HostedService $servicename -Certificate $cert -SubscriptionId $sub | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-Deployment -Slot Production | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Set-DeploymentStatus 'Running' | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-OperationStatus -WaitToComplete
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
Notice that in each case, we are first getting our service by passing in the certificate
and our subscription ID.&amp;#160; Again, since this is Powershell, we can get the certificate
quite easily:
&lt;/p&gt;
&lt;code&gt;$cert = Get-Item cert:\CurrentUser\My\D6BE55AC428FAC6CDEBAFF432BDC0780F1BD00CF&lt;/code&gt; 
&lt;p&gt;
You will find your Subscription ID on the portal under the 'Account' tab.&amp;#160; Note
that we are breaking up the steps by using the &lt;strong&gt;&lt;em&gt;Get-OperationStatus&lt;/em&gt;&lt;/strong&gt; cmdlet
and having it block until it completes.&amp;#160; This is because the Service Management
API is an asynchronous model.
&lt;/p&gt;
&lt;p&gt;
Similarly, here is a script that will upgrade a single role or the entire deployment
depending on the arguments passed to it:
&lt;/p&gt;
&lt;code&gt; 
&lt;p&gt;
$label = 'nolabel' 
&lt;br /&gt;
$role = '' 
&lt;/p&gt;
&lt;p&gt;
if ($args.Length -eq 2) 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; $role = $args[0] 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; $label = $args[1] 
&lt;br /&gt;
} 
&lt;/p&gt;
&lt;p&gt;
if ($args.Length -eq 1) 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; $label = $args[0] 
&lt;br /&gt;
} 
&lt;/p&gt;
&lt;p&gt;
if ($role -ne '') 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-HostedService $servicename -Certificate $cert -SubscriptionId
$sub | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-Deployment -Slot Production | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Set-Deployment -mode Auto -roleName $role -package $package -label
$label | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-OperationStatus -WaitToComplete 
&lt;br /&gt;
} 
&lt;br /&gt;
else 
&lt;br /&gt;
{ 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-HostedService $servicename -Certificate $cert -SubscriptionId
$sub | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-Deployment -Slot Production | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Set-Deployment -mode Auto -package $package -label $label | 
&lt;br /&gt;
&amp;#160;&amp;#160;&amp;#160; Get-OperationStatus -WaitToComplete 
&lt;br /&gt;
}
&lt;/p&gt;
&lt;/code&gt; 
&lt;p&gt;
&lt;a href="http://code.msdn.microsoft.com/azurecmdlets"&gt;Download the cmdlets from Code
Gallery&lt;/a&gt; and leave me some feedback if you like them or if they are not working
for you.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=a4c8084f-de9b-4074-b2e9-5137453466f1" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,a4c8084f-de9b-4074-b2e9-5137453466f1.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=3f1a0256-eaa3-4521-84d6-c4e7ae0c65a4</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,3f1a0256-eaa3-4521-84d6-c4e7ae0c65a4.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,3f1a0256-eaa3-4521-84d6-c4e7ae0c65a4.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=3f1a0256-eaa3-4521-84d6-c4e7ae0c65a4</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Things are getting crazy here at Microsoft getting ready for PDC.  I haven't
had much time to blog or tweet for that matter.  However, I am taking a break
from the grind to announce something I am really excited about - a sample TableBrowser
service we are hosting for developers at <a href="https://www.myazurestorage.com/">MyAzureStorage.com</a>.
</p>
        <p>
We built this service using ASP.NET MVC on a rich AJAX interface.  The goals
of this service were to provide developers to an easy way to create, query, and manage
their Windows Azure tables.  What better way to host this than on a scalable
compute platform like Windows Azure?
</p>
        <p>
          <strong>Create and Delete Tables</strong>
        </p>
        <p>
If you need to create or manage your tables, you get a nice big list of the ones you
have.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_2.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_thumb.png" width="504" height="448" />
          </a>
        </p>
        <p>
          <strong>Create, Edit, and Clone your Entities</strong>
        </p>
        <p>
I love being able to edit my table data on the fly.  Since we can clone the entity,
it makes it trivial to copy large entities around and just apply updates.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_4.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_thumb_1.png" width="504" height="469" />
          </a>
        </p>
        <p>
          <strong>Query Entities</strong>
        </p>
        <p>
        </p>
        <p>
Of course, no browser application would be complete without being able to query your
data as well.  Since the ADO.NET Data Services syntax can be a little unfamiliar
at first, we decided to go for a more natural syntax route.  Using simple predicates
long with OR, AND, and NOT operations, you can easily test your queries.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_6.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_thumb_2.png" width="504" height="469" />
          </a>
        </p>
        <p>
          <strong>Display Data</strong>
        </p>
        <p>
Lastly, we have tried to make showing data in Windows Azure as convenient as possible. 
Since data is not necessarily rectangular in nature in Windows Azure tables, we have
given you some options:  First, you can choose the attributes to display in columns
by partition.  Next, you expand the individual entity to show each attribute.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_10.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_thumb_4.png" width="504" height="483" />
          </a>
        </p>
        <p>
          <strong>Please note:</strong>  during login you will need to supply your storage
account name and key.  We <strong>do not</strong> store this key.  It is
kept in an encrypted cookie and passed back and forth on each request.  Furthermore,
we have SSL enabled to protect the channel.
</p>
        <p>
          <a href="https://www.myazurestorage.com/">The service</a> is open for business right
now and will run at least until PDC (and hopefully longer).  Enjoy and let me
know through the blog any feedback you have or issues you run into.
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=3f1a0256-eaa3-4521-84d6-c4e7ae0c65a4" />
      </body>
      <title>Launching MyAzureStorage.com</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,3f1a0256-eaa3-4521-84d6-c4e7ae0c65a4.aspx</guid>
      <link>http://dunnry.com/blog/2009/10/07/LaunchingMyAzureStoragecom.aspx</link>
      <pubDate>Wed, 07 Oct 2009 00:27:41 GMT</pubDate>
      <description>&lt;p&gt;
Things are getting crazy here at Microsoft getting ready for PDC.&amp;#160; I haven't
had much time to blog or tweet for that matter.&amp;#160; However, I am taking a break
from the grind to announce something I am really excited about - a sample TableBrowser
service we are hosting for developers at &lt;a href="https://www.myazurestorage.com/"&gt;MyAzureStorage.com&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;
We built this service using ASP.NET MVC on a rich AJAX interface.&amp;#160; The goals
of this service were to provide developers to an easy way to create, query, and manage
their Windows Azure tables.&amp;#160; What better way to host this than on a scalable
compute platform like Windows Azure?
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Create and Delete Tables&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
If you need to create or manage your tables, you get a nice big list of the ones you
have.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_thumb.png" width="504" height="448" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Create, Edit, and Clone your Entities&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
I love being able to edit my table data on the fly.&amp;#160; Since we can clone the entity,
it makes it trivial to copy large entities around and just apply updates.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_thumb_1.png" width="504" height="469" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Query Entities&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;/p&gt;
&lt;p&gt;
Of course, no browser application would be complete without being able to query your
data as well.&amp;#160; Since the ADO.NET Data Services syntax can be a little unfamiliar
at first, we decided to go for a more natural syntax route.&amp;#160; Using simple predicates
long with OR, AND, and NOT operations, you can easily test your queries.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_thumb_2.png" width="504" height="469" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Display Data&lt;/strong&gt;
&lt;/p&gt;
&lt;p&gt;
Lastly, we have tried to make showing data in Windows Azure as convenient as possible.&amp;#160;
Since data is not necessarily rectangular in nature in Windows Azure tables, we have
given you some options:&amp;#160; First, you can choose the attributes to display in columns
by partition.&amp;#160; Next, you expand the individual entity to show each attribute.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_10.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/LaunchingMyAzureStorage.com_F584/image_thumb_4.png" width="504" height="483" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Please note:&lt;/strong&gt;&amp;#160; during login you will need to supply your storage
account name and key.&amp;#160; We &lt;strong&gt;do not&lt;/strong&gt; store this key.&amp;#160; It is
kept in an encrypted cookie and passed back and forth on each request.&amp;#160; Furthermore,
we have SSL enabled to protect the channel.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://www.myazurestorage.com/"&gt;The service&lt;/a&gt; is open for business right
now and will run at least until PDC (and hopefully longer).&amp;#160; Enjoy and let me
know through the blog any feedback you have or issues you run into.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=3f1a0256-eaa3-4521-84d6-c4e7ae0c65a4" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,3f1a0256-eaa3-4521-84d6-c4e7ae0c65a4.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
    <item>
      <trackback:ping>http://dunnry.com/blog/Trackback.aspx?guid=d04a11c7-c621-402d-b7b7-0499bb352ab2</trackback:ping>
      <pingback:server>http://dunnry.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://dunnry.com/blog/PermaLink,guid,d04a11c7-c621-402d-b7b7-0499bb352ab2.aspx</pingback:target>
      <dc:creator>Ryan Dunn</dc:creator>
      <wfw:comment>http://dunnry.com/blog/CommentView,guid,d04a11c7-c621-402d-b7b7-0499bb352ab2.aspx</wfw:comment>
      <wfw:commentRss>http://dunnry.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=d04a11c7-c621-402d-b7b7-0499bb352ab2</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Windows Azure has been in CTP since PDC 08 in October of last year.  Since that
time, we have had a fairly simple, yet powerful concept for how to upgrade your application. 
Essentially, we have two environments: staging and production.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_6.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_thumb_2.png" width="504" height="239" />
          </a> 
</p>
        <p>
The difference between these two environments is only in the URI that points to any
web exposed services.  In staging, we give you an opaque GUID-like URI (e.g.
&lt;guidvalue&gt;.cloudapp.net) that is hard to publically discover and in production,
we give you the URI that you chose when you created the hosted service (e.g. &lt;yourservice&gt;.cloudapp.net).
</p>
        <h2>VIP Swaps, Deploys, and Upgrades
</h2>
        <p>
When you wanted to upgrade your service, you needed to deploy the updated service
package containing all your roles into one of the environments.  Typically, this
was in the staging environment.  Whenever you were ready, you would then click
the big button in the middle to swap environments.  This re-programmed the load
balancers and suddenly staging was production and vice versa.  If anything went
wrong in your upgrade, you could hit the button again and you were back to the original
deployment in seconds.  We called this model a "VIP Swap" and it is easy to understand
and very powerful.
</p>
        <p>
We heard from some customers that they wanted more flexibility to upgrade an individual
role without redeploying the entire service.  Typically, this can be because
there might be some state or caching going on in one of the other roles that a VIP
swap would cause to be lost.
</p>
        <p>
The good news is that now you can upgrade individual roles (or even the whole service)
using the in place upgrade.  When you click the new 'Upgrade' button on the portal,
you will see a screen very similar to the 'Deploy' screen that you would be used to
from before, but this time you have two new options.
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_8.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_thumb_3.png" width="504" height="444" />
          </a> 
</p>
        <h2>Upgrade Domains
</h2>
        <p>
The first new option allow you to choose if you want the upgrade to be 'Automatic'
or 'Manual' across the upgrade domains.  To understand this option, you would
probably want to understand what an 'Upgrade Domain' is all about.  You can think
of upgrade domains as vertical slices of your application, crossing roles.  So,
if I had a service with a single web role using 10 instances with 2 worker roles,
each with 4 instances, then with 2 upgrade domains, I would have a 5 web role instance,
and 2 + 2 worker roles instances in each upgrade domain.  Illustrated:
</p>
        <p>
          <a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_12.png">
            <img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_thumb_5.png" width="500" height="319" />
          </a>
        </p>
        <p>
If I choose 'Automatic', it simply means that each upgrade domain will be sequentially
be brought down and upgraded in turn.  If I choose 'Manual', then I need to click
another button between each upgrade domain update in order to proceed.
</p>
        <p>
          <strong>Note</strong>:  in the CTP today, 2 upgrade domains are automatically
defined and set.  In the future, you will be able to specify how many upgrade
domains you would like to have.
</p>
        <h2>Role Upgrades
</h2>
        <p>
Next, we have a radio button that specifies if you want to update the whole service,
or a specific role with in the service.  Most folks will likely use the role
specific update.
</p>
        <p>
It is important to note that these upgrades are for the services where the topology
has not changed.  That is, you cannot update the Service Definition (e.g. adding,
removing roles or configuration options).  If you want to change the topology,
you would need to use the more familiar VIP swap model.
</p>
        <p>
Once you click <strong>Deploy</strong>, the selected role will be upgraded according
to the upgrade mode you specified.
</p>
        <p>
More information about in-place upgrades and update domains can be found <a href="http://msdn.microsoft.com/en-us/library/ee517255.aspx">here</a>. 
Lastly, you can of course eschew the portal and perform all of these actions using
the new <a href="http://msdn.microsoft.com/en-us/library/ee460807.aspx">Service Management
API</a>.  Happy upgrading!
</p>
        <img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=d04a11c7-c621-402d-b7b7-0499bb352ab2" />
      </body>
      <title>Upgrading Your Service in Windows Azure</title>
      <guid isPermaLink="false">http://dunnry.com/blog/PermaLink,guid,d04a11c7-c621-402d-b7b7-0499bb352ab2.aspx</guid>
      <link>http://dunnry.com/blog/2009/09/18/UpgradingYourServiceInWindowsAzure.aspx</link>
      <pubDate>Fri, 18 Sep 2009 21:15:14 GMT</pubDate>
      <description>&lt;p&gt;
Windows Azure has been in CTP since PDC 08 in October of last year.&amp;#160; Since that
time, we have had a fairly simple, yet powerful concept for how to upgrade your application.&amp;#160;
Essentially, we have two environments: staging and production.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_6.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_thumb_2.png" width="504" height="239" /&gt;&lt;/a&gt;&amp;#160;
&lt;/p&gt;
&lt;p&gt;
The difference between these two environments is only in the URI that points to any
web exposed services.&amp;#160; In staging, we give you an opaque GUID-like URI (e.g.
&amp;lt;guidvalue&amp;gt;.cloudapp.net) that is hard to publically discover and in production,
we give you the URI that you chose when you created the hosted service (e.g. &amp;lt;yourservice&amp;gt;.cloudapp.net).
&lt;/p&gt;
&lt;h2&gt;VIP Swaps, Deploys, and Upgrades
&lt;/h2&gt;
&lt;p&gt;
When you wanted to upgrade your service, you needed to deploy the updated service
package containing all your roles into one of the environments.&amp;#160; Typically, this
was in the staging environment.&amp;#160; Whenever you were ready, you would then click
the big button in the middle to swap environments.&amp;#160; This re-programmed the load
balancers and suddenly staging was production and vice versa.&amp;#160; If anything went
wrong in your upgrade, you could hit the button again and you were back to the original
deployment in seconds.&amp;#160; We called this model a "VIP Swap" and it is easy to understand
and very powerful.
&lt;/p&gt;
&lt;p&gt;
We heard from some customers that they wanted more flexibility to upgrade an individual
role without redeploying the entire service.&amp;#160; Typically, this can be because
there might be some state or caching going on in one of the other roles that a VIP
swap would cause to be lost.
&lt;/p&gt;
&lt;p&gt;
The good news is that now you can upgrade individual roles (or even the whole service)
using the in place upgrade.&amp;#160; When you click the new 'Upgrade' button on the portal,
you will see a screen very similar to the 'Deploy' screen that you would be used to
from before, but this time you have two new options.
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_8.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_thumb_3.png" width="504" height="444" /&gt;&lt;/a&gt;&amp;#160;
&lt;/p&gt;
&lt;h2&gt;Upgrade Domains
&lt;/h2&gt;
&lt;p&gt;
The first new option allow you to choose if you want the upgrade to be 'Automatic'
or 'Manual' across the upgrade domains.&amp;#160; To understand this option, you would
probably want to understand what an 'Upgrade Domain' is all about.&amp;#160; You can think
of upgrade domains as vertical slices of your application, crossing roles.&amp;#160; So,
if I had a service with a single web role using 10 instances with 2 worker roles,
each with 4 instances, then with 2 upgrade domains, I would have a 5 web role instance,
and 2 + 2 worker roles instances in each upgrade domain.&amp;#160; Illustrated:
&lt;/p&gt;
&lt;p&gt;
&lt;a href="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_12.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://dunnry.com/blog/content/binary/WindowsLiveWriter/UpgradingYourServiceinWindowsAzure_7A77/image_thumb_5.png" width="500" height="319" /&gt;&lt;/a&gt; 
&lt;/p&gt;
&lt;p&gt;
If I choose 'Automatic', it simply means that each upgrade domain will be sequentially
be brought down and upgraded in turn.&amp;#160; If I choose 'Manual', then I need to click
another button between each upgrade domain update in order to proceed.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Note&lt;/strong&gt;:&amp;#160; in the CTP today, 2 upgrade domains are automatically
defined and set.&amp;#160; In the future, you will be able to specify how many upgrade
domains you would like to have.
&lt;/p&gt;
&lt;h2&gt;Role Upgrades
&lt;/h2&gt;
&lt;p&gt;
Next, we have a radio button that specifies if you want to update the whole service,
or a specific role with in the service.&amp;#160; Most folks will likely use the role
specific update.
&lt;/p&gt;
&lt;p&gt;
It is important to note that these upgrades are for the services where the topology
has not changed.&amp;#160; That is, you cannot update the Service Definition (e.g. adding,
removing roles or configuration options).&amp;#160; If you want to change the topology,
you would need to use the more familiar VIP swap model.
&lt;/p&gt;
&lt;p&gt;
Once you click &lt;strong&gt;Deploy&lt;/strong&gt;, the selected role will be upgraded according
to the upgrade mode you specified.
&lt;/p&gt;
&lt;p&gt;
More information about in-place upgrades and update domains can be found &lt;a href="http://msdn.microsoft.com/en-us/library/ee517255.aspx"&gt;here&lt;/a&gt;.&amp;#160;
Lastly, you can of course eschew the portal and perform all of these actions using
the new &lt;a href="http://msdn.microsoft.com/en-us/library/ee460807.aspx"&gt;Service Management
API&lt;/a&gt;.&amp;#160; Happy upgrading!
&lt;/p&gt;
&lt;img width="0" height="0" src="http://dunnry.com/blog/aggbug.ashx?id=d04a11c7-c621-402d-b7b7-0499bb352ab2" /&gt;</description>
      <comments>http://dunnry.com/blog/CommentView,guid,d04a11c7-c621-402d-b7b7-0499bb352ab2.aspx</comments>
      <category>Azure</category>
      <category>Cloud Services</category>
      <category>Windows Azure</category>
    </item>
  </channel>
</rss>
