<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Cloudy in Seattle</title><subtitle type="html" /><id>http://blogs.msdn.com/jnak/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/jnak/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2009-11-30T11:00:00Z</updated><entry><title>Where to Find your Windows Azure Billable Usage Info</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/02/08/where-to-find-your-windows-azure-billable-usage-info.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/02/08/where-to-find-your-windows-azure-billable-usage-info.aspx</id><published>2010-02-09T06:26:00Z</published><updated>2010-02-09T06:26:00Z</updated><content type="html">&lt;P&gt;This weekend I had someone email me asking me to blog about where to find the usage info used for billing because they were having a hard time finding it and figured others were having difficulty as well.&lt;/P&gt;
&lt;P&gt;Coincidentally, I saw an internal thread this morning where someone was asking the very same question so... Erik, I believe you are correct, a post will probably be helpful for folks.&lt;/P&gt;
&lt;P&gt;To find your usage info, go to:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://mocp.microsoftonline.com/" mce_href="https://mocp.microsoftonline.com"&gt;https://mocp.microsoftonline.com&lt;/A&gt; (From the Developer Portal, you can click on the "Billing" link in the upper right hand corner.&lt;/P&gt;
&lt;P&gt;I'm going to walk through getting to the actual bill because I know some people get this far but get lost in some of these pages.&lt;/P&gt;
&lt;P&gt;Choose your country / region and hit continue.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_thumb.png" width=476 height=246 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Then click “Sign in now” or “Sign in” and sign in.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_thumb_1.png" width=479 height=279 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Followed by “View my bills”, then click on “View Online Bill/Invoice”&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_thumb_2.png" width=486 height=249 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_thumb_2.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the “Online Bill” page you can select the Billing Period and click on one of the Usage Charge links in the middle of the page. This will bring you to a page similar to the following:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_thumb_3.png" width=484 height=268 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WheretoFindyourWindowsAzureBillableUsage_13B83/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Essentially, everything you want to know about your bill will be there.&amp;nbsp; Note that this doesn’t update in real time and that there is a lag.&lt;/P&gt;
&lt;P&gt;Also note that you need to &lt;A href="http://blogs.msdn.com/jnak/archive/2010/02/05/windows-azure-compute-hours-include-the-time-your-deployment-is-stopped.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2010/02/05/windows-azure-compute-hours-include-the-time-your-deployment-is-stopped.aspx"&gt;delete your deployment to stop the clock on compute hours&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9960213" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Azure/default.aspx" /><category term="Billing" scheme="http://blogs.msdn.com/jnak/archive/tags/Billing/default.aspx" /><category term="Usage" scheme="http://blogs.msdn.com/jnak/archive/tags/Usage/default.aspx" /></entry><entry><title>Migrating an Existing ASP.NET App to run on Windows Azure</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/02/08/migrating-an-existing-asp-net-app-to-run-on-windows-azure.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/02/08/migrating-an-existing-asp-net-app-to-run-on-windows-azure.aspx</id><published>2010-02-08T17:00:00Z</published><updated>2010-02-08T17:00:00Z</updated><content type="html">&lt;P&gt;This post has 2 main parts.&amp;nbsp; The first part is an update to a &lt;A href="http://blogs.msdn.com/jnak/archive/2009/02/05/using-an-existing-asp-net-web-application-as-a-windows-azure-web-role.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2009/02/05/using-an-existing-asp-net-web-application-as-a-windows-azure-web-role.aspx"&gt;post I wrote back in February 2009&lt;/A&gt; about using an existing ASP.NET Web Application as Web Role and rolls in information from &lt;A href="http://blogs.msdn.com/jnak/archive/2009/11/19/asp-net-mvc-and-windows-azure-november-2009-edition.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2009/11/19/asp-net-mvc-and-windows-azure-november-2009-edition.aspx"&gt;this post&lt;/A&gt; and &lt;A href="http://blogs.msdn.com/jnak/archive/2009/11/18/tips-and-tricks-for-using-visual-studio-2010-to-build-applications-that-run-on-windows-azure.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2009/11/18/tips-and-tricks-for-using-visual-studio-2010-to-build-applications-that-run-on-windows-azure.aspx"&gt;this post&lt;/A&gt;.&amp;nbsp; The second part is about migrating an existing database running on SQL Express and ASP.NET providers to SQL Azure.&lt;/P&gt;
&lt;P&gt;I’ll start with the &lt;A href="http://nerddinner.codeplex.com/" mce_href="http://nerddinner.codeplex.com"&gt;NerdDinner sample&lt;/A&gt;, so make sure you have &lt;A href="http://www.asp.net/mvc/download/" mce_href="http://www.asp.net/mvc/download/"&gt;ASP.NET MVC installed&lt;/A&gt;.&amp;nbsp; Although I used VS 2008 for the screen shots, this walkthrough is compatible with VS 2010.&lt;/P&gt;
&lt;P&gt;I’ve opened the solution in Visual Studio and removed the test project to keep things simple.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb.png" width=241 height=276 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The first thing I need to do is make this Web Application project a Web Role.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;I can do that one of two ways:&lt;/P&gt;
&lt;P&gt;1) Since I have the NerdDinner project open, I can add a Windows Azure Cloud Service to the solution.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_1.png" width=378 height=306 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Select “Windows Azure Cloud Service” and hit “OK”&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_2.png" width=410 height=195 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Hit “OK” again, because we don’t need to add any Roles to this Cloud Service.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_8.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_3.png" width=415 height=259 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Right click on the “Roles” node in the Cloud Service project and select “Add | Web Role Project in solution…”&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_10.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_4.png" width=354 height=229 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Select the NerdDinner project.&amp;nbsp; Note that all of the Web Application projects in the solution will show up in this list.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_12.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_5.png" width=414 height=153 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;2) The other option would have been to create a new Cloud Service project and add the NerdDinner project to it using Solution | Add | Existing Project… then following the step of Add | Web Role Project in solution…&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_14.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_6.png" width=335 height=247 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;We now have the following:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_16.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_7.png" width=212 height=358 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_7.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before I get to what it will take to hit F5 and make the NerdDinner application run as a Web Role, let’s discuss the differences between a Web Role and an ASP.NET Web Application.&lt;/P&gt;
&lt;P&gt;There are 4 differences and they are:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;References to the Windows Azure specific assemblies: Microsoft.WindowsAzure.Diagnostics, Microsoft.WindowsAzure.ServiceRuntime, and Microsoft.WindowsAzure.StorageClient &lt;/LI&gt;
&lt;LI&gt;Bootstrap code in the WebRole.cs/vb file that starts the DiagnosticMonitor as well as defines a default behavior of recycling the role when a configuration setting change occurs. &lt;/LI&gt;
&lt;LI&gt;The addition of a trace listener in the web.config file: Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener. &lt;/LI&gt;
&lt;LI&gt;In the case of an MVC web application, the assembly reference to System.Web.Mvc may not have the Copy Local property set to “True” – you need to to have this to ensure that the System.Web.Mvc assembly is available in the cloud.&amp;nbsp; The cloud VMs only contain the assemblies that come with the .NET Framework 3.5 SP1 redistributable. (System.Web.Mvc is not one of them and this is actually a hard thing to diagnose today as your role will go into an intializing, starting, stopping loop).&amp;nbsp; Setting “Copy Local” to True will ensure the assembly is added to the Service Package – the package that gets uploaded to the cloud and used to run a Cloud Service on the local development fabric. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_18.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_8.png" width=217 height=340 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Additionally, today we only support targeting .NET Framework 3.5 SP1.&amp;nbsp; Stay tuned for .NET 4 support.&lt;/P&gt;
&lt;P&gt;Except for #4, the other 3 differences aren’t strictly required.&lt;/P&gt;
&lt;P&gt;Chances are, at a minimum you are going to want to reference Microsoft.WindowsAzure.ServiceRuntime and Microsoft.WindowsAzure.Diagnostics, start the Diagnostic Monitor and add the trace listener so that you can write logs and gather other diagnostic information to diagnose issues or monitor the health of your application. &lt;/P&gt;
&lt;P&gt;If you use Windows Azure Storage, you are going to want to use the Microsoft.WindowsAzure.StorageClient library which provides a .NET interface to Windows Azure Storage.&lt;/P&gt;
&lt;P&gt;For the sake of this article, I’m just going to make sure that System.Web.Mvc has Copy Local set to true.&lt;/P&gt;
&lt;P&gt;Let’s try hitting F5 and seeing what we get.&lt;/P&gt;
&lt;P&gt;The application runs… almost…&amp;nbsp; if I click on “View Upcoming Dinners” I get an error.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_20.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_20.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_9.png" width=382 height=133 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_9.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The connectionstrings.config file that is referenced in the web.config is not being found.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;connectionStrings &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;configSource&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;ConnectionStrings.config&lt;/SPAN&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;I need to make sure that this file is added to the Service Package.&amp;nbsp; I can do so by adding it to the NerdDinner project (right click on the NerdDinner project in Solution Explorer and select Add | Existing Item…)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_22.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_22.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_10.png" width=379 height=187 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_10.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now set the Build Action to Content which should be done by default but I want to call it out as a way to ensure that given files in the project get added to the Service Package – you may a need to do this with some of your other files.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_24.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_24.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_11.png" width=268 height=334 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_11.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now, I hit F5 again, and everything works. But will it work in the cloud?&lt;/P&gt;
&lt;P&gt;The answer is no – NerdDinner has a NerdDinner.mdf file it uses for data and it makes use of ASP.NET providers – both of these rely on SQL Express, which I have on my local machine but are not available in the cloud VMs (even if it was, you would need to have a story that works across multiple instances).&lt;/P&gt;
&lt;P&gt;I have a decision to make.&amp;nbsp; I can use SQL Azure or I can rewrite the application to use Windows Azure Storage.&amp;nbsp; Since it is easy to do a search for “NerdDinner Azure” and find examples of the latter I will do the former – the point of this article is also to primarily focus on using the an existing project in a Windows Azure Cloud Service.&lt;/P&gt;
&lt;P&gt;In the real world, you’ll want to consider your data and compare the long term costs / effort / requirements to make the right decision.&lt;/P&gt;
&lt;P&gt;The key app I need to migrate the data to SQL Azure is the SQL Server Management Studio R2 CTP that supports SQL Azure.&amp;nbsp; &lt;A href="http://blogs.msdn.com/sqlazure/archive/2009/11/11/9921041.aspx" mce_href="http://blogs.msdn.com/sqlazure/archive/2009/11/11/9921041.aspx"&gt;Links are here&lt;/A&gt;. &lt;A href="http://blogs.msdn.com/jnak/archive/2009/11/02/setting-up-sql-server-management-studio-with-sql-server-express-2008-installed.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2009/11/02/setting-up-sql-server-management-studio-with-sql-server-express-2008-installed.aspx"&gt;This post&lt;/A&gt; may also be helpful.&lt;/P&gt;
&lt;P&gt;I also need to have a database setup on SQL Azure.&amp;nbsp; Go to sql.azure.com and sign in. Create databases called NerdDinnerDB and aspprovidersdb.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_30.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_30.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_14.png" width=396 height=298 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_14.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Make sure to set your firewall settings such that you can the machine where your app is running in the development fabric has access. For example: this is not recommended, but makes development on multiple machines easy.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_26.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_26.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_12.png" width=415 height=174 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_12.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The steps to migrate the data are now: &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Migrate the NerdDinner.MDF &lt;/LI&gt;
&lt;LI&gt;Migrate the ASP.NET providers &lt;/LI&gt;
&lt;LI&gt;Change the connection strings.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Let’s start with NerdDinner.MDF.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Open SQL Server Management Studio 2008 R2 and connect to .\SQLExpress.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Right click on Databases, and select “Attach…”&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_28.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_28.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_13.png" width=331 height=305 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_13.png"&gt;&lt;/A&gt; 
&lt;P&gt;Click the Add… button and browse to the location of the NerdDinner.MDF file then click OK.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_32.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_32.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_15.png" width=442 height=396 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_15.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now right click on the NerdDinner database that was just added, select Tasks | Generate Scripts…&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_34.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_34.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_16.png" width=435 height=397 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_16.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This will bring you to the Generate and Publish Scripts wizard.&amp;nbsp; Click Next twice (selecting the default of the whole database) then click Advanced on the “Set Scripting Options” page. &lt;/P&gt;
&lt;P&gt;Scroll down to “Script for the database engine type” and select “SQL Azure Database”.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_36.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_36.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_17.png" width=497 height=427 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_17.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;You also have an option to choose whether to script the schema only, the schema and data or the data only.&amp;nbsp; For the purposes of this walkthrough, you can choose the schema only or the schema and data.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/MigratinganExi.NETApptorunonWindowsAzure_9F2D/clip_image002_2.jpg"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/MigratinganExi.NETApptorunonWindowsAzure_9F2D/clip_image002_thumb.jpg" width=360 height=318&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Finish the wizard saving the script to file then open the file in SSMS.&lt;/P&gt;
&lt;P&gt;Now we want to connect to SQL Azure.&amp;nbsp; Do so by right clicking the Connect button in Object Explorer and selecting “Database Engine”.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;For server name put the name you got from the SQL Azure portal, including the full domain name.&amp;nbsp; For example in the SQL Azure portal, the server name is listed as: zky996mdy7.database.windows.net&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_42.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_42.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_20.png" width=440 height=191 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_20.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Correspondingly, enter this Server name in the Connect to Server dialog in SSMS:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_38.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_38.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_18.png" width=327 height=244 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_18.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The login is the Administrator username and the password setup in the SQL Azure portal.&amp;nbsp; Note that @zky996mdy7 is appended to the username.&lt;/P&gt;
&lt;P&gt;Click on Options &amp;gt;&amp;gt; select the “Connection Properties” tab and enter NerdDinnerDB for “Connect to database”.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_44.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_44.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_21.png" width=313 height=191 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_21.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This puts the SQL Azure database in the Object Explorer in SSMS.&lt;/P&gt;
&lt;P&gt;Right click on the SQL Azure database and select “New Query”.&amp;nbsp; This will open a SQL Query window.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_46.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_46.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_22.png" width=321 height=124 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_22.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Copy and paste in the database script the SQL Query window and hit Execute.&amp;nbsp; In the bottom status area of SSMS you should see that the query executed successfull and that it was against your SQL Azure NerdDinnerDB database.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_48.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_48.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_23.png" width=539 height=84 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_23.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now we need to setup the ASP Providers.&amp;nbsp; This requires using provider scripts that we created for SQL Azure.&amp;nbsp; See &lt;A href="http://blogs.msdn.com/jnak/archive/2009/11/24/asp-net-provider-scripts-for-sql-azure.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2009/11/24/asp-net-provider-scripts-for-sql-azure.aspx"&gt;this post for the scripts and more info&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Download the scripts and extract.&lt;/P&gt;
&lt;P&gt;Open the InstallCommon.SQL script in SSMS.&amp;nbsp; Since we were last connected to the NerdDinnerDB and we now want to connect to the aspprovidersDB you created above in the SQL Azure portal, right click in the query window and select Connection | Disconnect.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_50.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_50.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_24.png" width=335 height=179 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_24.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Follow that by right clicking in the SQL Query window and selecting Connection | Connect, entering the aspprovidersDB as the database to connect to in the options.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_52.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_52.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_25.png" width=298 height=198 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/UsinganExis.NETAppasaWindowsAzureWebRole_11595/image_thumb_25.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Run the script, open InstallMembership.SQL and installprofile.SQL and run those scripts as well.&amp;nbsp; Just be sure to always be running these scripts against aspprovidersdb.&lt;/P&gt;
&lt;P&gt;Now we need to change the connection strings in the connectionstrings.config file we added to the NerdDinner project.&amp;nbsp; There is a connection string for the NerdDinner database and a connection string for the ASP Providers.&lt;/P&gt;
&lt;P&gt;Here’s an example to follow, replacing the server, user ID and Password appropriately.&amp;nbsp; &lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;connectionStrings&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;add &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;ApplicationServices&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;connectionString&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Server=tcp:zky996mdy7.database.windows.net;Database=aspprovidersdb;User ID=jnak;Password=&amp;lt;enter&amp;gt;;Trusted_Connection=False;&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;providerName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;System.Data.SqlClient&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
  &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;add &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;NerdDinnerConnectionString&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;connectionString&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;Server=tcp:zky996mdy7.database.windows.net;Database=NerdDinnerDB;User ID=jnak;Password=&amp;lt;enter&amp;gt;;Trusted_Connection=False;&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;providerName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;System.Data.SqlClient&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;connectionStrings&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Delete the database files in App_Data and hit F5 to run this in the Development Fabric.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;A couple things to test to ensure that both the providers and the nerddinner database are working correctly: Register for an account, host a dinner and view all upcoming dinners.&lt;/P&gt;
&lt;P&gt;Now deploy this to the cloud -- Please see the &lt;A href="http://msdn.microsoft.com/en-us/library/ee460772.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee460772.aspx"&gt;Deploying a Cloud Service&lt;/A&gt; walkthrough if you need help.&lt;/P&gt;
&lt;P&gt;What’s cool to consider here is we started with a single instance ASP.NET web application and turned it into a scalable cloud application that has the capability to be load balanced across any number of instances.&lt;/P&gt;
&lt;P&gt;As I look back at this walkthrough, it’s actually quite long but over half is migrating the data to SQL Azure and there was a lot of screen shots.&amp;nbsp; The key things I want you get out of this post are:&lt;/P&gt;
&lt;P&gt;1) Add existing ASP.NET Web Applications to the same solution as a Cloud Service project and use Roles | Add | Web Role in project…&lt;/P&gt;
&lt;P&gt;2) Understand the 4 differences between a Windows Azure Web Role project and a standard Web Application project&lt;/P&gt;
&lt;P&gt;3) Figure out how you are going to handle your data, you have a few options notably Windows Azure Storage and SQL Azure. Don’t forget about your providers.&lt;/P&gt;
&lt;P&gt;4) Walkthrough of migrating an existing database to SQL Azure.&lt;/P&gt;
&lt;P&gt;Finally, whenever you are deploying the cloud, it is useful to look into the service package and make sure that everything you need is in the service package.&amp;nbsp; See &lt;A href="http://blogs.msdn.com/jnak/archive/2009/04/16/digging-in-to-the-windows-azure-service-package.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2009/04/16/digging-in-to-the-windows-azure-service-package.aspx"&gt;this post&lt;/A&gt; for more info – remember Windows Azure VMs only include the .NET Framework 3.5 SP1 redistributable. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9959178" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="walkthrough" scheme="http://blogs.msdn.com/jnak/archive/tags/walkthrough/default.aspx" /><category term="ASP.Net" scheme="http://blogs.msdn.com/jnak/archive/tags/ASP.Net/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="SQL Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/SQL+Azure/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Azure/default.aspx" /></entry><entry><title>Windows Azure Compute Hours include the time your Deployment is Stopped</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/02/05/windows-azure-compute-hours-include-the-time-your-deployment-is-stopped.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/02/05/windows-azure-compute-hours-include-the-time-your-deployment-is-stopped.aspx</id><published>2010-02-05T21:05:00Z</published><updated>2010-02-05T21:05:00Z</updated><content type="html">&lt;P&gt;One of my tenets on this blog is to not do posts that simply point to someone else’s post.&amp;nbsp; I’m breaking that tenant today because of something I just found out that I think is super important for all Windows Azure customers to be clear on and saw that &lt;A href="http://dunnry.com/blog/HowDoIStopTheBillingMeterInWindowsAzure.aspx" mce_href="http://dunnry.com/blog/HowDoIStopTheBillingMeterInWindowsAzure.aspx"&gt;Ryan Dunn had already posted about this&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Windows Azure compute time is calculated based on the time that you’ve deployed the app, not the time your app is in the running state.&lt;/P&gt;
&lt;P&gt;For example, if you put your deployment in the stopped state, you will continue to be charged for Compute hours – the rate at which will correspond to the VM Size you have selected.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://dunnry.com/blog/ct.ashx?id=7ed8cbd1-2104-475f-94d6-a1451169c873&amp;amp;url=http%3a%2f%2fdunnry.com%2fblog%2fcontent%2fbinary%2fWindowsLiveWriter%2fHowDoIStoptheBillingMeterinWindowsAzure_A88E%2fimage_4.png" mce_href="http://dunnry.com/blog/ct.ashx?id=7ed8cbd1-2104-475f-94d6-a1451169c873&amp;amp;url=http%3a%2f%2fdunnry.com%2fblog%2fcontent%2fbinary%2fWindowsLiveWriter%2fHowDoIStoptheBillingMeterinWindowsAzure_A88E%2fimage_4.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureComputeHoursincludethetimeyo_B7E5/clip_image002_97837b05-1a90-4ff3-9bb6-0f79821b979d.gif" width=414 height=191 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureComputeHoursincludethetimeyo_B7E5/clip_image002_97837b05-1a90-4ff3-9bb6-0f79821b979d.gif"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;In order to not be charged Compute hours, you need to delete the deployment.&amp;nbsp; This will look as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://dunnry.com/blog/ct.ashx?id=7ed8cbd1-2104-475f-94d6-a1451169c873&amp;amp;url=http%3a%2f%2fdunnry.com%2fblog%2fcontent%2fbinary%2fWindowsLiveWriter%2fHowDoIStoptheBillingMeterinWindowsAzure_A88E%2fimage_6.png" mce_href="http://dunnry.com/blog/ct.ashx?id=7ed8cbd1-2104-475f-94d6-a1451169c873&amp;amp;url=http%3a%2f%2fdunnry.com%2fblog%2fcontent%2fbinary%2fWindowsLiveWriter%2fHowDoIStoptheBillingMeterinWindowsAzure_A88E%2fimage_6.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: inline; BORDER-TOP: 0px; BORDER-RIGHT: 0px" title=clip_image004 border=0 alt=clip_image004 src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureComputeHoursincludethetimeyo_B7E5/clip_image004_178b92e1-ad84-4084-ba6d-0c3734772381.gif" width=415 height=161 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureComputeHoursincludethetimeyo_B7E5/clip_image004_178b92e1-ad84-4084-ba6d-0c3734772381.gif"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Ryan goes on to show you how to use the powershell cmdlets to automate deleting your deployments, please check out &lt;A href="http://dunnry.com/blog/HowDoIStopTheBillingMeterInWindowsAzure.aspx" mce_href="http://dunnry.com/blog/HowDoIStopTheBillingMeterInWindowsAzure.aspx"&gt;his post&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;We are working on making this more obvious on the developer portal.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9959010" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Azure/default.aspx" /></entry><entry><title>February 2010 Release of the Windows Azure Tools for Microsoft Visual Studio v1.1</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/02/01/february-2010-release-of-the-windows-azure-tools-for-microsoft-visual-studio-v1-1.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/02/01/february-2010-release-of-the-windows-azure-tools-for-microsoft-visual-studio-v1-1.aspx</id><published>2010-02-02T00:00:00Z</published><updated>2010-02-02T00:00:00Z</updated><content type="html">&lt;P&gt;I’m pleased to announce that the &lt;A href="http://go.microsoft.com/fwlink/?LinkID=128752" mce_href="http://go.microsoft.com/fwlink/?LinkID=128752"&gt;Windows Azure Tools for Microsoft Visual Studio 1.1&lt;/A&gt; (&lt;A href="http://download.microsoft.com/download/5/5/E/55E49560-47A8-4E9E-B3A5-FF8FDB37046B/VSCloudService.exe" mce_href="http://download.microsoft.com/download/5/5/E/55E49560-47A8-4E9E-B3A5-FF8FDB37046B/VSCloudService.exe"&gt;direct link&lt;/A&gt; while the release propagates) has been released to coincide with the general availability of Windows Azure.&lt;/P&gt;
&lt;P&gt;This release supports VS 2008 and the upcoming VS 2010 RC.&amp;nbsp; For VS 2010 Beta 2 please use the &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=6967FF37-813E-47C7-B987-889124B43ABD&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?familyid=6967FF37-813E-47C7-B987-889124B43ABD&amp;amp;displaylang=en"&gt;November 2009&lt;/A&gt; release.&lt;/P&gt;
&lt;P&gt;New for version 1.1: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Windows Azure Drive: Enable a Windows Azure application to use existing NTFS APIs to access a durable drive. This allows the Windows Azure application to mount a page blob as a drive letter, such as X:, and enables easy migration of existing NTFS applications to the cloud.&lt;/LI&gt;
&lt;LI&gt;OS Version Support: Allows a Windows Azure application to choose the appropriate Guest OS to run on in the cloud.&lt;/LI&gt;
&lt;LI&gt;Bug Fixes 
&lt;UL&gt;
&lt;LI&gt;StorageClient: Expose account key from storage credentials, expose continuation tokens for pagination, and reduce maximum buffer size for parallel uploads.&lt;/LI&gt;
&lt;LI&gt;Windows Azure Diagnostics: Fix path corruption for crash dumps, OnDemandTransfer now respects LogLevelFilter.&lt;/LI&gt;
&lt;LI&gt;VS 2010: Improved packaging performance.&lt;/LI&gt;
&lt;LI&gt;VS 2010: Support for linked files in Web projects.&lt;/LI&gt;
&lt;LI&gt;VS 2010: Support for ASP.NET web project web.config transformations.&lt;/LI&gt;
&lt;LI&gt;Certificate selection lists certificates from LocalMachine\My instead of CurrentUser\My.&lt;/LI&gt;
&lt;LI&gt;Right click on Role under Roles folder to select whether to launch the browser against HTTP, HTTPS or not at all.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Updated and additional samples are available at: &lt;A href="http://code.msdn.microsoft.com/windowsazuresamples" mce_href="http://code.msdn.microsoft.com/windowsazuresamples"&gt;http://code.msdn.microsoft.com/windowsazuresamples&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9955482" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Azure/default.aspx" /></entry><entry><title>Windows Azure Tools for Microsoft Visual Studio 2010 RC</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/02/01/windows-azure-tools-for-microsoft-visual-studio-2010-rc.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/02/01/windows-azure-tools-for-microsoft-visual-studio-2010-rc.aspx</id><published>2010-02-02T00:00:00Z</published><updated>2010-02-02T00:00:00Z</updated><content type="html">&lt;P&gt;Windows Azure Tools for Microsoft Visual Studio extend Visual Studio to enable the creation, building, configuring, debugging, running and packaging of scalable web applications and services on Windows Azure. &lt;/P&gt;
&lt;P&gt;The &lt;A href="http://go.microsoft.com/fwlink/?LinkID=128752" mce_href="http://go.microsoft.com/fwlink/?LinkID=128752"&gt;February 2010 release of the Windows Azure Tools for Microsoft Visual Studio&lt;/A&gt; support the Visual Studio 2008 SP1 and the upcoming Visual Studio 2010 RC.&lt;/P&gt;
&lt;P&gt;We’re very excited about Visual Studio 2010! The RC, available soon, will support a broad ‘go-live’ license, increased performance and stability, and is an excellent vehicle for providing any remaining feedback prior to the final release build.&lt;/P&gt;
&lt;P&gt;Additionally, because of the improvements in the Visual Studio 2010 RC, we’ve made a number of RC specific improvements to our tools:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Improved packaging performance. &lt;/LI&gt;
&lt;LI&gt;Support for linked files in Web projects. &lt;/LI&gt;
&lt;LI&gt;Support for ASP.NET web project web.config transformations.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If you are looking to download the Windows Azure Tools for Visual Studio 2010 Beta 2 -- please use the &lt;A href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6967ff37-813e-47c7-b987-889124b43abd&amp;amp;displaylang=en" mce_href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6967ff37-813e-47c7-b987-889124b43abd&amp;amp;displaylang=en"&gt;November 2009 release&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Learn more at &lt;A href="http://windowsazure.com/" mce_href="http://windowsazure.com"&gt;http://windowsazure.com&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9955508" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Azure/default.aspx" /></entry><entry><title>Installing Certificates in Windows Azure VMs</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/01/29/installing-certificates-in-windows-azure-vms.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/01/29/installing-certificates-in-windows-azure-vms.aspx</id><published>2010-01-29T17:00:00Z</published><updated>2010-01-29T17:00:00Z</updated><content type="html">&lt;P&gt;A little while ago I posted &lt;A href="http://blogs.msdn.com/jnak/archive/2009/12/01/how-to-add-an-https-endpoint-to-a-windows-azure-cloud-service.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2009/12/01/how-to-add-an-https-endpoint-to-a-windows-azure-cloud-service.aspx"&gt;How To: Add an HTTPS Endpoint to a Windows Azure Cloud Service&lt;/A&gt; which talked about the whole process around adding an HTTPS endpoint and configuring &amp;amp; uploading the SSL certificate for that endpoint.&lt;/P&gt;
&lt;P&gt;This post is a follow up to that post to talk about installing any certificate to a Windows Azure VM.&amp;nbsp; You may want to do this to install various client certificates or even to install the intermediate certificates to complete the certificate chain for your SSL certificate.&lt;/P&gt;
&lt;P&gt;In order to peak into the cloud, I’ve written a very simple app that will enumerate the certificates of the Current User\Personal (or My) store.&lt;/P&gt;
&lt;P&gt;Create a new Windows Azure Cloud Service and add an ASP.NET Web Role to it.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Open up default.aspx and add the following between the empty &amp;lt;div&amp;gt;&amp;lt;/div&amp;gt; to setup a table that will be used to list the certificates.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;Table &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="certificateTable" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;TableRow &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;TableCell &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"&amp;gt;&lt;/SPAN&gt;Friendly Name:&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;TableCell&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;TableCell &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"&amp;gt;&lt;/SPAN&gt;Issued By:&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;TableCell&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;TableCell &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"&amp;gt;&lt;/SPAN&gt;Issued To:&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;TableCell&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;TableCell &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"&amp;gt;&lt;/SPAN&gt;Expiration Date:&lt;SPAN style="COLOR: blue"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;TableCell&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;TableRow&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: maroon"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Now, I have some simple code that opens up a certificate store and adds a row to the table for each certificate found with the Friendly Name, Issuer, Subject and Expiration date.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;protected void &lt;/SPAN&gt;Page_Load(&lt;SPAN style="COLOR: blue"&gt;object &lt;/SPAN&gt;sender, &lt;SPAN style="COLOR: #2b91af"&gt;EventArgs &lt;/SPAN&gt;e)
{
    &lt;SPAN style="COLOR: #2b91af"&gt;X509Certificate2Collection &lt;/SPAN&gt;selectedCerts = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;X509Certificate2Collection&lt;/SPAN&gt;();

    &lt;SPAN style="COLOR: #2b91af"&gt;X509Store &lt;/SPAN&gt;store = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;X509Store&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #2b91af"&gt;StoreName&lt;/SPAN&gt;.My, &lt;SPAN style="COLOR: #2b91af"&gt;StoreLocation&lt;/SPAN&gt;.CurrentUser);
    &lt;SPAN style="COLOR: blue"&gt;try
    &lt;/SPAN&gt;{
        store.Open(&lt;SPAN style="COLOR: #2b91af"&gt;OpenFlags&lt;/SPAN&gt;.OpenExistingOnly | &lt;SPAN style="COLOR: #2b91af"&gt;OpenFlags&lt;/SPAN&gt;.ReadOnly);
        &lt;SPAN style="COLOR: blue"&gt;foreach &lt;/SPAN&gt;(&lt;SPAN style="COLOR: #2b91af"&gt;X509Certificate2 &lt;/SPAN&gt;cert &lt;SPAN style="COLOR: blue"&gt;in &lt;/SPAN&gt;store.Certificates)
        {
            &lt;SPAN style="COLOR: #2b91af"&gt;TableRow &lt;/SPAN&gt;certificateRow = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TableRow&lt;/SPAN&gt;();

            &lt;SPAN style="COLOR: green"&gt;// Friendly Name
            &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TableCell &lt;/SPAN&gt;friendlyNameCell = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TableCell&lt;/SPAN&gt;();
            &lt;SPAN style="COLOR: #2b91af"&gt;TextBox &lt;/SPAN&gt;friendlyNameText = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TextBox&lt;/SPAN&gt;();
            friendlyNameText.Text = cert.FriendlyName;
            friendlyNameCell.Controls.Add(friendlyNameText);
            certificateRow.Cells.Add(friendlyNameCell);

            &lt;SPAN style="COLOR: green"&gt;// Issuer
            &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TableCell &lt;/SPAN&gt;issuerCell = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TableCell&lt;/SPAN&gt;();
            &lt;SPAN style="COLOR: #2b91af"&gt;TextBox &lt;/SPAN&gt;issuerText = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TextBox&lt;/SPAN&gt;();
            issuerText.Text = cert.Issuer;
            issuerCell.Controls.Add(issuerText);
            certificateRow.Cells.Add(issuerCell);
            
            &lt;SPAN style="COLOR: green"&gt;// Subject
            &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TableCell &lt;/SPAN&gt;subjectCell = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TableCell&lt;/SPAN&gt;();
            &lt;SPAN style="COLOR: #2b91af"&gt;TextBox &lt;/SPAN&gt;subjectText = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TextBox&lt;/SPAN&gt;();
            subjectText.Text = cert.Subject;
            subjectCell.Controls.Add(subjectText);
            certificateRow.Cells.Add(subjectCell);

            &lt;SPAN style="COLOR: green"&gt;// Expiration
            &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TableCell &lt;/SPAN&gt;expirationCell = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TableCell&lt;/SPAN&gt;();
            &lt;SPAN style="COLOR: #2b91af"&gt;TextBox &lt;/SPAN&gt;expirationText = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;TextBox&lt;/SPAN&gt;();
            expirationText.Text = cert.NotAfter.ToString(&lt;SPAN style="COLOR: #a31515"&gt;"d"&lt;/SPAN&gt;);
            expirationCell.Controls.Add(expirationText);
            certificateRow.Cells.Add(expirationCell);
            
            &lt;SPAN style="COLOR: green"&gt;// Add the TableRow to the Table
            &lt;/SPAN&gt;certificateTable.Rows.Add(certificateRow);
        }
    }
    &lt;SPAN style="COLOR: blue"&gt;finally
    &lt;/SPAN&gt;{
        store.Close();
    }
}&lt;/PRE&gt;
&lt;P&gt;Build, publish and deploy this to the cloud and you’ll see that the CurrentUser\MY store is empty.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb.png" width=451 height=196 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that I have a way to show you the certificates that I install to the cloud, let’s follow the process to install 2 certificates.&amp;nbsp; One is a self signed certificate with a private key I created myself and the other is an intermediate certificate I got from the verisign web site.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Installing a certificate to Windows Azure is a three step process.&amp;nbsp; &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Configure the certificates to install per role&lt;/LI&gt;
&lt;LI&gt;Upload the certificates via the &lt;A href="http://windows.azure.com/" mce_href="http://windows.azure.com"&gt;Windows Azure Developer Portal&lt;/A&gt; per hosted service&lt;/LI&gt;
&lt;LI&gt;Deploy your app and when VMs are setup to host each of your role instances, those VMs will contain your certificates.&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: The configuration of the certificates are &lt;EM&gt;per role &lt;/EM&gt;but the upload of the certificates are for &lt;EM&gt;a hosted service &lt;/EM&gt;and will be used for all of the roles in that hosted service.&lt;/P&gt;
&lt;P&gt;Configure the certificates.&amp;nbsp; Bring up the configuration UI for the Web Role in your solution, click on “Certificates” and click on “Add Certificate”.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_1.png" width=344 height=215 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now click on the “. . .” to bring up the certificate selection dialog.&amp;nbsp; This currently enumerates the certificates in the CurrentUser\My store, however in future versions this will enumerate the certificates in LocalMachine\My.&amp;nbsp; The dialog specifies which store it is listing the certificates from.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_3.png" width=244 height=177 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;In my example, I’m selecting a self-signed certs with an exportable private key that I’ve setup ahead of time.&lt;/P&gt;
&lt;P&gt;This sets the thumbprint field for that certificate.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_4.png" width=504 height=142 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now I have a CER file from verisign which is an intermediate cert.&amp;nbsp; The steps to create it was to copy a big long chunk of text from their web site and save it as a .CER file which I did.&lt;/P&gt;
&lt;P&gt;I have a couple of choices on how to handle this, I could install this certificate to the CurrentUser\My store and select it from the VS UI to get the thumbprint.&lt;/P&gt;
&lt;P&gt;Instead, I’m going to open the certificate, switch to Details and copy the Thumbprint from the certificate itself (the point of doing the 2 certificates is to show alternate ways of handling the certificates):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_14.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_6.png" width=286 height=355 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now I click “Add Certificate” on the Certificates tab of the VS UI and paste in the thumbprint for my second certificate.&amp;nbsp; I also changed the names of the certificate entries to “SelfSigned” and “Intermediate” for clarity but certainly is not necessary.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_5.png" width=511 height=152 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;I changed the store location and store name to CurrentUser and My – typically you will install intermediate certs to the CA store but to keep this sample simple I only want to enumerate one store, CurrentUser\My which as we saw above is empty by default in Windows Azure so I’m installing the two example certificates to the CurrentUser\My store.&lt;/P&gt;
&lt;P&gt;The dropdown for store name currently contains My, Root, CA and Trust.&amp;nbsp; We do support you opening the service definition file and setting any string for the Store Name that you would like in the event that the 4 in the drop down are not sufficient.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Certificate &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;name&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;SelfSigned&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;storeLocation&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;SPAN style="COLOR: blue"&gt;CurrentUser&lt;/SPAN&gt;" &lt;SPAN style="COLOR: red"&gt;storeName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;=&lt;/SPAN&gt;"&lt;FONT color=#0000ff&gt;&amp;lt;enter a value&amp;gt;&lt;/FONT&gt;" &lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;I now need to upload these certificates through the Developer Portal which means I need them as files.&amp;nbsp; I have the .CER file already but need to export my self-signed cert from the certificate store.&lt;/P&gt;
&lt;P&gt;To do so I run certmgr.msc, browse to the certificate, right click | All Tasks | Export…&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_16.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_7.png" width=502 height=246 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_7.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This takes me through Windows Certificate Export Wizard.&amp;nbsp; One of the key things for SSL certificates and any other certificates where you need the private key in the Cloud, is to ensure that you select “Yes, export the private key” and provide a password during the export&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_18.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_8.png" width=356 height=186 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;After finishing the wizard, I now have 2 certificate files, the .CER file and the .PFX file that was just created.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_22.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_22.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_10.png" width=197 height=142 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_10.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now I go to the Developer portal, and select my Hosted Service.&amp;nbsp; Down at the bottom I select “Manage” under the “Certificates” heading.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_24.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_24.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_11.png" width=420 height=326 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_11.png"&gt;&lt;/A&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This allows me to browse to PFX files, type the same password you entered when exporting the certificate and uploading that certificate to the cloud.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_26.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_26.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_12.png" width=444 height=185 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_12.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You’ll notice here that the Portal only allows uploading of PFX files but we need to upload a .CER file.&amp;nbsp; This will change in the future but for now, there is some simple code you can run to convert your .CER file to PFX.&amp;nbsp; I put the following code in a console application and ran it.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;static void &lt;/SPAN&gt;Main(&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;[] args)
{
    &lt;SPAN style="COLOR: green"&gt;// The path to the certificate.
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;certificate = &lt;SPAN style="COLOR: #a31515"&gt;@"C:\Users\jnak.REDMOND\Desktop\verisignintermediate.cer"&lt;/SPAN&gt;;

    &lt;SPAN style="COLOR: green"&gt;// Load the certificate into an X509Certificate object.
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;X509Certificate &lt;/SPAN&gt;cert = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;X509Certificate&lt;/SPAN&gt;(certificate);
    &lt;SPAN style="COLOR: blue"&gt;byte&lt;/SPAN&gt;[] certData = cert.Export(&lt;SPAN style="COLOR: #2b91af"&gt;X509ContentType&lt;/SPAN&gt;.Pkcs12);

    System.IO.&lt;SPAN style="COLOR: #2b91af"&gt;File&lt;/SPAN&gt;.WriteAllBytes(&lt;SPAN style="COLOR: #a31515"&gt;@"C:\Users\jnak.REDMOND\Desktop\verisignintermediate.pfx"&lt;/SPAN&gt;, certData);
}&lt;/PRE&gt;
&lt;P&gt;Now that I have a PFX file for my CER file, I upload that leaving the password field blank because the password is only used to protect private keys which CER files do not have and therefore this PFX file also does not have.&lt;/P&gt;
&lt;P&gt;You can see here that both certificates are now installed to my Hosted Service.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_30.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_30.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_14.png" width=587 height=298 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_14.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now I deploy my Cloud Service which will enumerate the two certificates I installed to the CurrentUser\My store.&amp;nbsp; If you deployed the app already as I did above, just suspend and delete that deployment and deploy the app again with the new configuration.&amp;nbsp; (both the service definition and service configuration files have changed so the package (cspkg) and service configuration (cscfg) need to be deployed again to Windows Azure.&lt;/P&gt;
&lt;P&gt;After you complete the deploy process and your app is running on Windows Azure, you’ll now see the following:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_32.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_32.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_15.png" width=508 height=197 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/ed182b47948b_F813/image_thumb_15.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This shows that the VMs in the cloud for your role have the certificates you configured and uploaded installed.&lt;/P&gt;
&lt;P&gt;Finally I’ll reiterate that certificate configuration is on a per role basis.&amp;nbsp; As an example, if I added a worker role to this same Cloud Service, the VMs for the worker role instances would not contain the certificates we configured above unless you opened up the configuration UI for the Worker role and added the same entries to the Certificates tab.&lt;/P&gt;
&lt;P&gt;That said, because the certificates are upload per hosted service – you do not need to upload the certificates to the cloud more than once for a given Cloud Service.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9952768" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="walkthrough" scheme="http://blogs.msdn.com/jnak/archive/tags/walkthrough/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Azure/default.aspx" /><category term="certificate" scheme="http://blogs.msdn.com/jnak/archive/tags/certificate/default.aspx" /></entry><entry><title>Windows Azure Debugging: Matching an Instance in the DevFabric to its Process</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/01/26/windows-azure-debugging-matching-an-instance-in-the-devfabric-to-its-process.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/01/26/windows-azure-debugging-matching-an-instance-in-the-devfabric-to-its-process.aspx</id><published>2010-01-26T17:00:00Z</published><updated>2010-01-26T17:00:00Z</updated><content type="html">&lt;P&gt;One of the things I run into from time to time is the need/desire to match an instance I’m watching in the Development Fabric UI back to its process.&lt;/P&gt;
&lt;P&gt;This may be because I am sitting on a breakpoint in Visual Studio and want to look at the corresponding logs for that process in the DevFabric UI or because I want to use some non Windows Azure aware tool that requires a process ID. &lt;/P&gt;
&lt;P&gt;For example, given a Web and a Worker role with 3 instances each, I can watch the instances in the development fabric UI by right clicking on the Windows Azure task tray icon and select “Show Development Fabric UI”:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_4.png" width=244 height=122 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_24.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_24.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_11.png" width=548 height=188 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_11.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This is useful for a couple of reasons, sometimes I want to double check the status of my roles and instances but more commonly I want to watch the logs on a per instance basis. &lt;/P&gt;
&lt;P&gt;Although the logs are shown in the Visual Studio output window, all of the messages for all of the instances show up there:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_22.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_22.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_10.png" width=409 height=95 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_10.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Which is fine for the common case where I’m debugging a single instance at a time but not so good as soon as I have more than one instance.&lt;/P&gt;
&lt;P&gt;Let’s setup an example, create a new Windows Azure Cloud Service in Visual Studio, add an ASP.NET Web Role and a Worker Role and you’ll have the following in Solution Explorer:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb.png" width=210 height=317 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Set the instance count to 3 for each role by bringing up the role configuration UI for each role: &lt;BR&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_1.png" width=317 height=190 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;and setting “Instance count” to 3.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_2.png" width=326 height=227 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Now I’m going to set a breakpoint in the WorkerRole.cs file in the Worker Role project.&amp;nbsp; You can see that the default worker role code just loops and writes a trace message.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_5.png" width=459 height=203 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Hit F5 to start debugging the Cloud Service on the Development Fabric.&lt;/P&gt;
&lt;P&gt;When I hit a breakpoint – I can see that Visual Studio is debugging multiple WaWorkerHost.exe and WaWebHost.exe processes – these correspond to Worker and Web role instances respectively.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_3.png" width=443 height=280 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;But which process corresponds to which logs in the Development Fabric UI?&amp;nbsp; &lt;/P&gt;
&lt;P&gt;That is, if I’m stopped on a breakpoint for a WaWorkerHost.exe process with ID 4460 – how do I know which log output in the Development Fabric UI corresponds to the process I’m currently stopped on?&lt;/P&gt;
&lt;P&gt;As it turns out, there are two ways I can get the information I want -- which is the process ID for the instances I’m looking at in the Development Fabric.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option 1:&lt;/STRONG&gt; Check the log file.&amp;nbsp; If you look carefully, the log file will have the text “-parent xyz” where xyz is the process ID of the WaWorkerHost.exe or WaWebHost.exe that is hosting your worker or web role instance.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_14.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_6.png" width=535 height=301 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Option 2&lt;/STRONG&gt;: Use the “Attach debugger…” functionality from the context menu in the Development Fabric.&amp;nbsp; Right click on one of the instance nodes in the Development Fabric and select “Attach debugger…”&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_16.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_7.png" width=246 height=328 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_7.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will bring up a VS dialog that has both the process name and the process ID on it.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_20.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_20.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_9.png" width=432 height=222 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_9.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;I can then use that process ID to correspond an instance in the DevFabric UI to the process I’m stopped on in Visual Studio. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: If you aren’t debugging your cloud service from Visual Studio and you choose to use this DevFabric UI option to “Attach Debugger” -- On x64 systems, the “Attach debugger…” functionality only attaches the native debugger so it will appear as though even though you are attached that you can’t hit breakpoints in managed code.&lt;/P&gt;
&lt;P&gt;To workaround this issue, make note of process ID and then click “No, cancel debugging”.&amp;nbsp; Open up Visual Studio and select Debug | Attach to Process…&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_28.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_28.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_13.png" width=329 height=227 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_13.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Select the process with the matching process ID and click “Attach”.&amp;nbsp; To explicitly select a debugger, before clicking “Attach”, click the “Select…” button which will allow you to specify which debugger you want to attach.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_26.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_26.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_12.png" width=486 height=328 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureDebuggingMatchingaLogtoitsPr_1510C/image_thumb_12.png"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far we’ve seen that multiple instances on the development fabric isn’t used nearly as much as doing single instance debugging, however I have a feeling that as more and more apps adopt the Windows Azure scale out model, there are going to be more cases where developers are going to want to test/debug multi-instance scenarios locally.&lt;/P&gt;
&lt;P&gt;To that end, I hope this helps and let me know if you think we need to do more for this scenario.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9952675" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="ASP.Net" scheme="http://blogs.msdn.com/jnak/archive/tags/ASP.Net/default.aspx" /><category term="Development Fabric" scheme="http://blogs.msdn.com/jnak/archive/tags/Development+Fabric/default.aspx" /><category term="debug" scheme="http://blogs.msdn.com/jnak/archive/tags/debug/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Azure/default.aspx" /></entry><entry><title>Windows Azure Instance &amp; Storage Limits</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/01/22/windows-azure-instances-storage-limits.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/01/22/windows-azure-instances-storage-limits.aspx</id><published>2010-01-22T17:00:00Z</published><updated>2010-01-22T17:00:00Z</updated><content type="html">&lt;P&gt;Recently, a colleague of mine wrote about the Windows Azure instance limits: &lt;A href="http://blog.toddysm.com/2010/01/windows-azure-role-instance-limits-explained.html" mce_href="http://blog.toddysm.com/2010/01/windows-azure-role-instance-limits-explained.html"&gt;http://blog.toddysm.com/2010/01/windows-azure-role-instance-limits-explained.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;His post is very complete, I recommend you have a look but here is my take:&lt;/P&gt;
&lt;P&gt;These are default limits that are in place to ensure that Windows Azure will always have VMs available to all of our customers.&amp;nbsp; If you have a need for more capacity, we want to help!&amp;nbsp; Please contact us: &lt;A href="http://go.microsoft.com/fwlink/?LinkID=123579" mce_href="http://go.microsoft.com/fwlink/?LinkID=123579"&gt;http://go.microsoft.com/fwlink/?LinkID=123579&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The limits are: &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;20 Hosted Service Projects &lt;/LI&gt;
&lt;LI&gt;5 Storage Accounts &lt;/LI&gt;
&lt;LI&gt;5 roles per Hosted Service (i.e. 3 different web roles + 2 different worker roles or any such combination) &lt;/LI&gt;
&lt;LI&gt;20 CPU cores across all of your Hosted Service Projects&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;The first two are really easy to track, on the Development portal when you go to create a new service, it’ll tell you how many you have left of each:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureInstanceStorageLimits_F8B2/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureInstanceStorageLimits_F8B2/image_thumb_2.png" width=476 height=191&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;5 roles per Hosted Service is also easy to understand, this corresponds to the number of projects you can add as roles to your Cloud Service – here I am hitting my role limit:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureInstanceStorageLimits_F8B2/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureInstanceStorageLimits_F8B2/image_thumb_3.png" width=415 height=261&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;So let’s talk real quick about the 20 CPU core limit – note that the limit is on CPU cores, not on instances.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;When you configure your role, you can set the number of instances as well as the VM size:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureInstanceStorageLimits_F8B2/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureInstanceStorageLimits_F8B2/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureInstanceStorageLimits_F8B2/image_thumb.png" width=430 height=256 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzureInstanceStorageLimits_F8B2/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The VM sizes of Small, Medium, Large and ExtraLarge are defined here: &lt;A title=http://msdn.microsoft.com/en-us/library/ee814754.aspx href="http://msdn.microsoft.com/en-us/library/ee814754.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ee814754.aspx"&gt;http://msdn.microsoft.com/en-us/library/ee814754.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Today the CPU cores for each VM size are: (subject to change so always consult the MSDN link above for the latest information)&lt;/P&gt;
&lt;TABLE border=0 cellSpacing=0 cellPadding=2 width=187&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=102&gt;&lt;STRONG&gt;VM Size&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD vAlign=top width=83&gt;&lt;STRONG&gt;CPU Cores&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=102&gt;Small&lt;/TD&gt;
&lt;TD vAlign=top width=83&gt;1&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=102&gt;Medium&lt;/TD&gt;
&lt;TD vAlign=top width=83&gt;2&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=102&gt;Large&lt;/TD&gt;
&lt;TD vAlign=top width=83&gt;4&lt;/TD&gt;&lt;/TR&gt;
&lt;TR&gt;
&lt;TD vAlign=top width=102&gt;ExtraLarge&lt;/TD&gt;
&lt;TD vAlign=top width=83&gt;8&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;
&lt;P&gt;So the number of CPU cores for a role is the (instance count) X (Number of CPU Cores for the selected VM Size).&lt;/P&gt;
&lt;P&gt;If you add those up across all of your roles across all of your Hosted Service projects (staging and production slots) – this has to be lower than 20.&lt;/P&gt;
&lt;P&gt;Quick example: if you have 5 Hosted Service projects with 1 role, 2 instances per role and Medium VM size, you’ve hit the limit.&lt;/P&gt;
&lt;P&gt;The other key is that you not only need to stop your deployment to free up CPU cores, you also need to delete the deployment to reduce your CPU core count.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;What about Windows Azure Storage quotas?&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;It just so happens that another colleague of mine has written about this: &lt;A title=http://blogs.msdn.com/frogs69/archive/2009/12/17/storage-quotas-and-core-allocation-on-windows-azure.aspx href="http://blogs.msdn.com/frogs69/archive/2009/12/17/storage-quotas-and-core-allocation-on-windows-azure.aspx" mce_href="http://blogs.msdn.com/frogs69/archive/2009/12/17/storage-quotas-and-core-allocation-on-windows-azure.aspx"&gt;http://blogs.msdn.com/frogs69/archive/2009/12/17/storage-quotas-and-core-allocation-on-windows-azure.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Each storage account allows you to have 100TB of data across all of your blob, tables and queues.&amp;nbsp; As mentioned above, you can have up to 5 storage accounts.&lt;/P&gt;
&lt;P&gt;If you are dealing with really large data sets, follow the link above to see the limits on the blobs, # properties in a table, entity and queue messages.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9951636" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="Storage" scheme="http://blogs.msdn.com/jnak/archive/tags/Storage/default.aspx" /><category term="blob storage" scheme="http://blogs.msdn.com/jnak/archive/tags/blob+storage/default.aspx" /><category term="table storage" scheme="http://blogs.msdn.com/jnak/archive/tags/table+storage/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Azure/default.aspx" /></entry><entry><title>Windows Azure WCF Add Service Reference Patch and Windows 7</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/01/21/windows-azure-wcf-add-service-reference-patch-and-windows-7.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/01/21/windows-azure-wcf-add-service-reference-patch-and-windows-7.aspx</id><published>2010-01-21T19:01:00Z</published><updated>2010-01-21T19:01:00Z</updated><content type="html">&lt;P&gt;For those of you that watched my &lt;A href="http://microsoftpdc.com/Sessions/SVC53" mce_href="http://microsoftpdc.com/Sessions/SVC53"&gt;Tips &amp;amp; Tricks session at PDC&lt;/A&gt; or &lt;A href="http://blogs.msdn.com/jnak/archive/2009/11/18/tips-and-tricks-for-using-visual-studio-2010-to-build-applications-that-run-on-windows-azure.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2009/11/18/tips-and-tricks-for-using-visual-studio-2010-to-build-applications-that-run-on-windows-azure.aspx"&gt;followed along on my blog post&lt;/A&gt;, you'll recall that I mentioned the following:&lt;/P&gt;
&lt;P&gt;In general, WCF works correctly on Windows Azure.&amp;nbsp; There is a problem using "add service reference" or svcutil but we have a patch to workaround the problem.&amp;nbsp; The patch is installed in the cloud, and more information about this is here: &lt;A title=http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues href="http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues" mce_href="http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues"&gt;&lt;FONT color=#006ff7&gt;http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues&lt;/FONT&gt;&lt;/A&gt;&amp;nbsp;(note that a web.config change is also required)&lt;/P&gt;
&lt;P&gt;One of the things this prompted a lot of folks to ask is "Where is the Windows 7 version of this patch?"&lt;/P&gt;
&lt;P&gt;Well, I'm happy to announce that we have released this QFE for Windows 7 and Windows Server 2008 R2: &lt;A href="http://code.msdn.microsoft.com/KB977420"&gt;http://code.msdn.microsoft.com/KB977420&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I also recommend that if you are using WCF on Windows Azure, you spend time browsing the content on &lt;A title=http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues href="http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues" mce_href="http://code.msdn.microsoft.com/wcfazure/Wiki/View.aspx?title=KnownIssues"&gt;&lt;FONT color=#006ff7&gt;http://code.msdn.microsoft.com/wcfazure&lt;/FONT&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;You may also be interested in the REST service templates the WCF team has made available on the Visual Studio Gallery: &lt;A href="http://visualstudiogallery.msdn.microsoft.com/en-us/842a05c3-4cc8-49d3-837f-5ec7e6b17e80"&gt;http://visualstudiogallery.msdn.microsoft.com/en-us/842a05c3-4cc8-49d3-837f-5ec7e6b17e80&lt;/A&gt;&amp;nbsp;(this is the .NET 3.5 C# template, there are also .NET 3.5 VB and .NET 4 C# and VB templates)&lt;/P&gt;
&lt;P&gt;Note that the REST templates aren't currently directly supported as a Windows Azure Role in the New Project Dialog, but you can easily use that template in a Windows Azure Cloud Service by following the &lt;A href="http://blogs.msdn.com/jnak/archive/2009/11/19/asp-net-mvc-and-windows-azure-november-2009-edition.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2009/11/19/asp-net-mvc-and-windows-azure-november-2009-edition.aspx"&gt;"Using an Existing Project" section of this post&lt;/A&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9951612" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="wcf" scheme="http://blogs.msdn.com/jnak/archive/tags/wcf/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Azure/default.aspx" /></entry><entry><title>Windows Azure - Resolving "The Path is too long after being fully qualified" Error Message</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/01/14/windows-azure-path-too-long.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/01/14/windows-azure-path-too-long.aspx</id><published>2010-01-14T18:00:00Z</published><updated>2010-01-14T18:00:00Z</updated><content type="html">&lt;P&gt;When you run a cloud service on the development fabric, the development fabric uses a temporary folder to store a number of files including local storage locations, cached binaries, configuration, diagnostics information and cached compiled web site content.&lt;/P&gt;
&lt;P&gt;By default this location is: C:\Users\&amp;lt;username&amp;gt;\AppData\Local\dftmp&lt;/P&gt;
&lt;P&gt;For the most part you won’t really care about this temporary folder, the Windows Azure Tools will periodically clean up the folder so it doesn’t get out of hand.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: To manually clean up the devfabric temporary folder, you can open an elevated Windows Azure SDK Command Prompt and run: “csrun /devfabric:shutdown” followed by “csrun /devfabric:clean”.&amp;nbsp; You really don’t need to do this but it can come in handy from time to time.&lt;/P&gt;
&lt;P&gt;There are some cases where the length of the path can cause problems.&lt;/P&gt;
&lt;P&gt;If the combination of your username, cloud service project name, role name and assembly name get so long that you run into assembly or file loading issues at runtime. This will give you the following error message when you hit F5:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;“The path is too long after being fully qualified.&amp;nbsp; Make sure the full path is less than 260 characters and the directory name is less than 248 characters.”&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For example, in my test, the path to one of the assemblies in my cloud service was:&lt;/P&gt;
&lt;P&gt;C:\Users\jnak\AppData\Local\dftmp\s0\deployment(4)\res\deployment(4).CloudServiceabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqr.WebRole1.0\AspNetTemp\aspNetTemp\root\aff90b31\aa373305\assembly\dl3\971d7b9b\0064bc6f_307dca01\Microsoft.WindowsAzure.Diagnostics.DLL&lt;/P&gt;
&lt;P&gt;which exceeds the 260 character path limit.&lt;/P&gt;
&lt;P&gt;If you aren’t married to your project and assembly names, you could name those differently so that they are shorter&lt;/P&gt;
&lt;P&gt;The other workaround is to change the location of the development fabric temporary folder to be a shorter path.&lt;/P&gt;
&lt;P&gt;You can do this by setting the _CSRUN_STATE_DIRECTORY to a shorter path, say “C:\A” for example.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzurePathtoolong_FDCC/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzurePathtoolong_FDCC/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzurePathtoolong_FDCC/image_thumb.png" width=333 height=193 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WindowsAzurePathtoolong_FDCC/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Make sure that you close Visual Studio and shutdown the development fabric by using the “csrun /devfabric:shutdown” command I mentioned above or by clicking “exit” on the Windows Azure the tray icon.&lt;/P&gt;
&lt;P&gt;After making this change, my sample above was able to run without problem.&lt;/P&gt;
&lt;P&gt;Of course, this workaround really only buys you more characters and ultimately you may have to simply reduce your path lengths through renaming.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9942481" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /></entry><entry><title>Walkthrough: Windows Azure Blob Storage (Nov 2009 and later)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/01/11/walkthrough-windows-azure-blob-storage-nov-2009-and-later.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="15688" href="http://blogs.msdn.com/jnak/attachment/9944702.ashx" /><id>http://blogs.msdn.com/jnak/archive/2010/01/11/walkthrough-windows-azure-blob-storage-nov-2009-and-later.aspx</id><published>2010-01-11T18:00:00Z</published><updated>2010-01-11T18:00:00Z</updated><content type="html">&lt;P&gt;Similar to the &lt;A href="http://blogs.msdn.com/jnak/archive/2010/01/06/walkthrough-windows-azure-table-storage-nov-2009-and-later.aspx"&gt;table storage walkthrough I posted last week&lt;/A&gt;, I updated this &lt;A href="http://blogs.msdn.com/jnak/archive/2008/10/29/walkthrough-simple-blob-storage-sample.aspx"&gt;blog post&lt;/A&gt; for the Nov 2009/v1.0 and later release of the Windows Azure Tools.&lt;/P&gt;
&lt;P&gt;This walkthrough covers what I found to be the simplest way to get a sample up and running on Windows Azure that uses the Blob Storage service. It is not trying to be comprehensive or trying to dive deep in the technology, it just serves as an introduction to how the Windows Azure Blob Storage Service works.&lt;/P&gt;
&lt;P&gt;Please take the &lt;A href="http://msdn.microsoft.com/en-us/library/dd203059.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd203059.aspx"&gt;Quick Lap Around the Tools&lt;/A&gt; before doing this walkthrough.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: The code for this walkthrough is &lt;A href="http://blogs.msdn.com/jnak/attachment/9944702.ashx" mce_href="http://blogs.msdn.com/jnak/attachment/9944702.ashx"&gt;attached to this blog post&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;After you have completed this walkthrough, you will have a Web Role that is a simple ASP.NET Web Application that shows a list of files that are stored and can be downloaded from Blob Storage. You can use the Web Role to add files to Blob storage and make them available in the list.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughSimpleBlobStorageSample_1000E/image_18.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughSimpleBlobStorageSample_1000E/image_thumb_1.png" width=473 height=446&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H3&gt;Blob Concepts&lt;/H3&gt;
&lt;P&gt;Each storage account has access to blob storage. For each account there can be 0..n containers. Each container contains the actual blobs, which is a raw byte array. Containers can be public or private. In public containers, the URLs to the blobs can be accessed over the internet while in a private container, only the account holder can access those blob URLs.&lt;/P&gt;
&lt;P&gt;Each Blob can have a set of metadata set as a NameValueCollection of strings.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughSimpleBlobStorageSample_1000E/image_20.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughSimpleBlobStorageSample_1000E/image_thumb_8.png" width=464 height=228&gt;&lt;/A&gt; &lt;/P&gt;
&lt;H3&gt;Creating the Cloud Service Project&lt;/H3&gt;
&lt;P&gt;1. Start Visual Studio as an administrator (Screen shots below are from VS 2008, VS 2010 is also supported)&lt;/P&gt;
&lt;P&gt;2. Create a new project: File | New Project&lt;/P&gt;
&lt;P&gt;3. Under the Visual C# node (VB is also supported), select the “Cloud Service” project type then select the “Windows Azure Cloud Service” project template. Set the name to be “SimpleBlobSample”. Hit OK to continue.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_4.png"&gt;&lt;IMG title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_1.png" width=558 height=173&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;This will bring up a dialog to add Roles to the Cloud Service.&lt;/P&gt;
&lt;P&gt;4. Add an ASP.NET Web Role to the Cloud Service, we’ll use the default name of “WebRole1”.&amp;nbsp; Hit OK.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_6.png"&gt;&lt;IMG title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_2.png" width=393 height=247&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Solution explorer should look as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureBlobStorageNov200_8D40/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureBlobStorageNov200_8D40/image_thumb.png" width=211 height=244&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;We’ll now cover the implementation, which can be broken up into 5 different parts:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Implementing the UI &lt;/LI&gt;
&lt;LI&gt;Connecting to Windows Azure storage &lt;/LI&gt;
&lt;LI&gt;Adding blobs &lt;/LI&gt;
&lt;LI&gt;Enumerating existing blobs &lt;/LI&gt;
&lt;LI&gt;Deleting blobs &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Implementing the UI&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;5. Next open up Default.aspx and add the code for the UI. The UI consists of:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;GridView at the top &lt;/LI&gt;
&lt;LI&gt;Label and FileUpload control &lt;/LI&gt;
&lt;LI&gt;2 Label and TextBox pairs (File Name and Submitter) &lt;/LI&gt;
&lt;LI&gt;Field validators to ensure that all of the fields are filled out before the file is uploaded. &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Add the following between the template generated &amp;lt;div&amp;gt;&amp;lt;/div&amp;gt; elements:&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;GridView &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileView" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;AutoGenerateColumns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="false" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataKeyNames&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="FileUri" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;OnRowCommand&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="RowCommandHandler"&amp;gt;
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Columns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ButtonField &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Delete" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;CommandName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="DeleteItem" /&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;HyperLinkField &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;HeaderText&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Link" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataTextField&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="FileName" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataNavigateUrlFields&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="FileUri" /&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;BoundField &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataField&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Submitter" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;HeaderText&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Submitted by" /&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Columns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;GridView&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;br &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Label &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="filePathLabel" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="File Path:" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;AssociatedControlID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileUploadControl"
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;FileUpload &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileUploadControl" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;RequiredFieldValidator &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="filUploadValidator" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ControlToValidate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileUploadControl"
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ValidationGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileInfoGroup" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ErrorMessage&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Select a File" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Server"&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;RequiredFieldValidator&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;br &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Label &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileNameLabel" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="File Name:" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;AssociatedControlID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileNameBox"
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;TextBox &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileNameBox" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;RequiredFieldValidator &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileNameValidator" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ControlToValidate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileNameBox"
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ValidationGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileInfoGroup" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ErrorMessage&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Enter the File Name" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Server"&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;RequiredFieldValidator&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;br &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Label &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="submitterLabel" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Submitter:" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;AssociatedControlID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="submitterBox"
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;TextBox &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="submitterBox" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;RequiredFieldValidator &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="submitterValidator" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ControlToValidate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="submitterBox"
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ValidationGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileInfoGroup" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ErrorMessage&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Enter the Submitter Name" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Server"&amp;gt;
&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;RequiredFieldValidator&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;br &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Button &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="insertButton" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Submit" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;CausesValidation&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="true" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ValidationGroup&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="fileInfoGroup"
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;OnClick&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="insertButton_Click" /&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;br &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;br &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Label &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="statusMessage" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;6. If you now switch to design view, you will see:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureBlobStorageNov200_8D40/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureBlobStorageNov200_8D40/image_thumb_2.png" width=277 height=221&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;You’ll also notice from that aspx that there is an event handler for OnRowCommand on the GridView to handle the DeleteItem command, IDs for the TextBoxes and an event handler for the OnClick event on the Submit button.&lt;/P&gt;
&lt;P&gt;The code for these will be filled out further down in the walkthrough.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Connecting to Windows Azure storage&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;7. Open Default.aspx.cs and add the code to connect to the Blob Storage Service to the Page_Load() method.&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;Microsoft.WindowsAzure;
&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;Microsoft.WindowsAzure.StorageClient;

&lt;SPAN style="COLOR: blue"&gt;namespace &lt;/SPAN&gt;WebRole1
{
    &lt;SPAN style="COLOR: blue"&gt;public partial class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;_Default &lt;/SPAN&gt;: System.Web.UI.&lt;SPAN style="COLOR: #2b91af"&gt;Page
    &lt;/SPAN&gt;{
        &lt;SPAN style="COLOR: blue"&gt;private &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;CloudBlobClient &lt;/SPAN&gt;_BlobClient = &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;
        &lt;SPAN style="COLOR: blue"&gt;private &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;CloudBlobContainer &lt;/SPAN&gt;_BlobContainer = &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;

        &lt;SPAN style="COLOR: blue"&gt;protected void &lt;/SPAN&gt;Page_Load(&lt;SPAN style="COLOR: blue"&gt;object &lt;/SPAN&gt;sender, &lt;SPAN style="COLOR: #2b91af"&gt;EventArgs &lt;/SPAN&gt;e)
        {
            &lt;SPAN style="COLOR: green"&gt;// Setup the connection to Windows Azure Storage
            &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;storageAccount = &lt;SPAN style="COLOR: #2b91af"&gt;CloudStorageAccount&lt;/SPAN&gt;.FromConfigurationSetting(&lt;SPAN style="COLOR: #a31515"&gt;"DataConnectionString"&lt;/SPAN&gt;);
            _BlobClient = storageAccount.CreateCloudBlobClient();&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;8.&amp;nbsp; Setup the “DataConnectionString” setting by opening up the configuration UI for WebRole1.&amp;nbsp; Right click on the WebRole1 node under the Roles folder in the SimpleBlobStorage cloud service project and select “Properties”.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureBlobStorageNov200_8D40/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureBlobStorageNov200_8D40/image_thumb_1.png" width=244 height=235&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;9. Switch to the Settings tab and click “Add Setting”.&amp;nbsp; Name it DataConnectionString, set the type to ConnectionString and click on the “…” button on the far right.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_16.png"&gt;&lt;IMG title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_7.png" width=538 height=380&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Hit “OK” to set the credentials to use Development Storage.&amp;nbsp; We’ll first get this sample working on development storage then convert it to use cloud storage later.&lt;/P&gt;
&lt;P&gt;10. If you actually tried to connect to Blob Storage at this point, you would find that the CloudStorageAccount.FromConfigurationSetting() call would fail with the following message:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;ConfigurationSettingSubscriber needs to be set before FromConfigurationSetting can be used&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This message is in fact incorrect – I have a bug filed to get this fixed, to say “Configuration Setting Publisher” and not “ConfigurationSettingSubscriber”.&lt;/P&gt;
&lt;P&gt;To resolve this, we need to add a bit of template code to the WebRole.cs file in WebRole1.&amp;nbsp; Add the following to the WebRole.OnStart() method in WebRole.cs in the WebRole1 project.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;Microsoft.WindowsAzure;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;public override bool &lt;/SPAN&gt;OnStart()
{
    &lt;SPAN style="COLOR: #2b91af"&gt;DiagnosticMonitor&lt;/SPAN&gt;.Start(&lt;SPAN style="COLOR: #a31515"&gt;"DiagnosticsConnectionString"&lt;/SPAN&gt;);

    &lt;SPAN style="COLOR: blue"&gt;#region &lt;/SPAN&gt;Setup CloudStorageAccount Configuration Setting Publisher

    &lt;SPAN style="COLOR: green"&gt;// This code sets up a handler to update CloudStorageAccount instances when their corresponding
    // configuration settings change in the service configuration file.
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;CloudStorageAccount&lt;/SPAN&gt;.SetConfigurationSettingPublisher((configName, configSetter) =&amp;gt;
    {
        &lt;SPAN style="COLOR: green"&gt;// Provide the configSetter with the initial value
        &lt;/SPAN&gt;configSetter(&lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironment&lt;/SPAN&gt;.GetConfigurationSettingValue(configName));

        &lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironment&lt;/SPAN&gt;.Changed += (sender, arg) =&amp;gt;
        {
            &lt;SPAN style="COLOR: blue"&gt;if &lt;/SPAN&gt;(arg.Changes.OfType&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironmentConfigurationSettingChange&lt;/SPAN&gt;&amp;gt;()
                .Any((change) =&amp;gt; (change.ConfigurationSettingName == configName)))
            {
                &lt;SPAN style="COLOR: green"&gt;// The corresponding configuration setting has changed, propagate the value
                &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if &lt;/SPAN&gt;(!configSetter(&lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironment&lt;/SPAN&gt;.GetConfigurationSettingValue(configName)))
                {
                    &lt;SPAN style="COLOR: green"&gt;// In this case, the change to the storage account credentials in the
                    // service configuration is significant enough that the role needs to be
                    // recycled in order to use the latest settings. (for example, the 
                    // endpoint has changed)
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironment&lt;/SPAN&gt;.RequestRecycle();
                }
            }
        };
    });
    &lt;SPAN style="COLOR: blue"&gt;#endregion

    &lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;// For information on handling configuration changes
    // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironment&lt;/SPAN&gt;.Changing += RoleEnvironmentChanging;

    &lt;SPAN style="COLOR: blue"&gt;return base&lt;/SPAN&gt;.OnStart();
}&lt;/PRE&gt;
&lt;P&gt;The comments (which I wrote and is included in the samples) should explain what is going on if you care to know.&amp;nbsp; In a nutshell, this code bridges the gap between the Microsoft.WindowsAzure.StorageClient assembly and the Microsoft.WindowsAzure.ServiceRuntime library – the Storage Client library is agnostic to the Windows Azure runtime as it can be used in non Windows Azure applications.&lt;/P&gt;
&lt;P&gt;This code essentially says how to get a setting value given a setting name and sets up an event handler to handle setting changes while running in the cloud (because the ServiceConfiguration.cscfg file was updated in the cloud).&lt;/P&gt;
&lt;P&gt;The key point is that with this snippet of code in place, you now have everything in place to connect to Windows Azure storage and create a CloudBlobClient instance.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Adding Blobs&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;11. In order to add blobs to a container, you first need to setup a container.&amp;nbsp; Let’s add this code to the Page_Load() method in Default.aspx.cs.&amp;nbsp; For a production application, you will want to optimize this code to avoid doing all this work on every page load.&lt;/P&gt;
&lt;P&gt;Page_Load() should now look as follows.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;protected void &lt;/SPAN&gt;Page_Load(&lt;SPAN style="COLOR: blue"&gt;object &lt;/SPAN&gt;sender, &lt;SPAN style="COLOR: #2b91af"&gt;EventArgs &lt;/SPAN&gt;e)
{
    &lt;SPAN style="COLOR: green"&gt;// Setup the connection to Windows Azure Storage
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;storageAccount = &lt;SPAN style="COLOR: #2b91af"&gt;CloudStorageAccount&lt;/SPAN&gt;.FromConfigurationSetting(&lt;SPAN style="COLOR: #a31515"&gt;"DataConnectionString"&lt;/SPAN&gt;);
    _BlobClient = storageAccount.CreateCloudBlobClient();

    &lt;SPAN style="COLOR: green"&gt;// Get and create the container
    &lt;/SPAN&gt;_BlobContainer = _BlobClient.GetContainerReference(&lt;SPAN style="COLOR: #a31515"&gt;"publicfiles"&lt;/SPAN&gt;);
    _BlobContainer.CreateIfNotExist();

    &lt;SPAN style="COLOR: green"&gt;// Setup the permissions on the container to be public
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;permissions = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;BlobContainerPermissions&lt;/SPAN&gt;();
    permissions.PublicAccess = &lt;SPAN style="COLOR: #2b91af"&gt;BlobContainerPublicAccessType&lt;/SPAN&gt;.Container;
    _BlobContainer.SetPermissions(permissions);

    &lt;SPAN style="COLOR: green"&gt;// Show the current list.
    &lt;/SPAN&gt;UpdateFileList();
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; The container is named with DNS naming restrictions (i.e. all lower case) and is created if it does not exist.&amp;nbsp; Additionally, the container is set to be a public container – i.e. the URIs to the blobs are accessible by anyone over the internet.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Had this been a private container, the blobs in that container could only be read by code that has the access key and account name.&lt;/P&gt;
&lt;P&gt;12.&amp;nbsp; Let’s now add the code to Default.aspx.cs to add a blob when the “Submit” button on the UI is clicked (remember the event handler was defined in the aspx).&lt;/P&gt;
&lt;P&gt;A GUID is created for the file name to ensure a unique blob name is used.&amp;nbsp; The file name and submitter are gotten from the TextBoxes in the UI.&lt;/P&gt;
&lt;P&gt;Blob Metadata, or user defined key/value pairs, is used to store the file name and submitter along with the blob.&amp;nbsp; &lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;protected void &lt;/SPAN&gt;insertButton_Click(&lt;SPAN style="COLOR: blue"&gt;object &lt;/SPAN&gt;sender, &lt;SPAN style="COLOR: #2b91af"&gt;EventArgs &lt;/SPAN&gt;e)
{
    &lt;SPAN style="COLOR: green"&gt;// Make a unique blob name
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;extension = System.IO.&lt;SPAN style="COLOR: #2b91af"&gt;Path&lt;/SPAN&gt;.GetExtension(fileUploadControl.FileName);

    &lt;SPAN style="COLOR: green"&gt;// Create the Blob and upload the file
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;blob = _BlobContainer.GetBlobReference(&lt;SPAN style="COLOR: #2b91af"&gt;Guid&lt;/SPAN&gt;.NewGuid().ToString() + extension);
    blob.UploadFromStream(fileUploadControl.FileContent);

    &lt;SPAN style="COLOR: green"&gt;// Set the metadata into the blob
    &lt;/SPAN&gt;blob.Metadata[&lt;SPAN style="COLOR: #a31515"&gt;"FileName"&lt;/SPAN&gt;] = fileNameBox.Text;
    blob.Metadata[&lt;SPAN style="COLOR: #a31515"&gt;"Submitter"&lt;/SPAN&gt;] = submitterBox.Text;
    blob.SetMetadata();

    &lt;SPAN style="COLOR: green"&gt;// Set the properties
    &lt;/SPAN&gt;blob.Properties.ContentType = fileUploadControl.PostedFile.ContentType;
    blob.SetProperties();

    &lt;SPAN style="COLOR: green"&gt;// Update the UI
    &lt;/SPAN&gt;UpdateFileList();
    fileNameBox.Text = &lt;SPAN style="COLOR: #a31515"&gt;""&lt;/SPAN&gt;;
    statusMessage.Text = &lt;SPAN style="COLOR: #a31515"&gt;""&lt;/SPAN&gt;;
}&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Enumerating Existing Blobs&lt;/STRONG&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;13. In order to simplify the databinding to the UI, lets add a FileEntry class that contains the data we want to show in the UI for each blob.&amp;nbsp; One instance of a FileEntry corresponds to a blob.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Right click on WebRole1 and select Add | Class…&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureBlobStorageNov200_8D40/image_10.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureBlobStorageNov200_8D40/image_thumb_4.png" width=267 height=369&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Name the class FileEntry.cs and hit OK.&lt;/P&gt;
&lt;P&gt;14. Fill out FileEntry.cs with the following code:&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;public class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;FileEntry
&lt;/SPAN&gt;{
    &lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;Uri &lt;/SPAN&gt;FileUri { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
    &lt;SPAN style="COLOR: blue"&gt;public string &lt;/SPAN&gt;FileName { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
    &lt;SPAN style="COLOR: blue"&gt;public string &lt;/SPAN&gt;Submitter { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;15. Back to Default.aspx.cs, let’s add code to populate the GridView by getting the collection of blobs from ListBlobs() and creating a FileEntry for each item.&lt;/P&gt;
&lt;P&gt;FetchAttributes() is used to retrieve the blob metadata.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;System.Collections.Generic;
&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;System.Collections.Specialized;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;private void &lt;/SPAN&gt;UpdateFileList()
{
    &lt;SPAN style="COLOR: green"&gt;// Get a list of the blobs
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;blobs = _BlobContainer.ListBlobs();
    &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;filesList = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;List&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;FileEntry&lt;/SPAN&gt;&amp;gt;();

    &lt;SPAN style="COLOR: green"&gt;// For each item, create a FileEntry which will populate the grid
    &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;foreach &lt;/SPAN&gt;(&lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;blobItem &lt;SPAN style="COLOR: blue"&gt;in &lt;/SPAN&gt;blobs)
    {
        &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;cloudBlob = _BlobContainer.GetBlobReference(blobItem.Uri.ToString());
        cloudBlob.FetchAttributes();

        filesList.Add(&lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;FileEntry&lt;/SPAN&gt;() { 
            FileUri = blobItem.Uri,
            FileName = cloudBlob.Metadata[&lt;SPAN style="COLOR: #a31515"&gt;"FileName"&lt;/SPAN&gt;],
            Submitter = cloudBlob.Metadata[&lt;SPAN style="COLOR: #a31515"&gt;"Submitter"&lt;/SPAN&gt;]
        });    
    }
    
    &lt;SPAN style="COLOR: green"&gt;// Bind the grid
    &lt;/SPAN&gt;fileView.DataSource = filesList;
    fileView.DataBind();
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;&lt;STRONG&gt;Deleting Blobs&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;16. Add code to delete the blob in the row command handler that was setup in the aspx. This is as simple as calling CloudBlobContainer.DeleteIfExists() for the blob where the CloudBlob instance is gotten from the Guid + file extension generated during the upload.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;protected void &lt;/SPAN&gt;RowCommandHandler(&lt;SPAN style="COLOR: blue"&gt;object &lt;/SPAN&gt;sender, &lt;SPAN style="COLOR: #2b91af"&gt;GridViewCommandEventArgs &lt;/SPAN&gt;e)
{
    &lt;SPAN style="COLOR: blue"&gt;if &lt;/SPAN&gt;(e.CommandName == &lt;SPAN style="COLOR: #a31515"&gt;"DeleteItem"&lt;/SPAN&gt;)
    {
        &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;index = &lt;SPAN style="COLOR: #2b91af"&gt;Convert&lt;/SPAN&gt;.ToInt32(e.CommandArgument);
        &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;blobName = (&lt;SPAN style="COLOR: blue"&gt;string&lt;/SPAN&gt;)fileView.DataKeys[index].Value;
        &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;blobContainer = _BlobClient.GetContainerReference(&lt;SPAN style="COLOR: #a31515"&gt;"publicFiles"&lt;/SPAN&gt;);
        &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;blob = blobContainer.GetBlobReference(blobName);
        blob.DeleteIfExists();
    }

    &lt;SPAN style="COLOR: green"&gt;// Update the UI
    &lt;/SPAN&gt;UpdateFileList();
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;&lt;STRONG&gt;Testing the Application&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;17. Build and hit F5 to run the application.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note: &lt;/STRONG&gt;The FileUpload control has a file size limit. You can modify it by changing the httpRuntime maxRequestLength attribute in web.config.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughSimpleBlobStorageSample_1000E/image_30.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughSimpleBlobStorageSample_1000E/image_thumb_13.png" width=420 height=281&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Moving from Development Storage to Cloud Storage&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;18. Now I want to switch this to use Windows Azure Storage, not the development storage.&amp;nbsp; The first step is to go to the &lt;A href="http://windows.azure.com/"&gt;Windows Azure Developer Portal&lt;/A&gt; and create a storage account.&lt;/P&gt;
&lt;P&gt;Login and click on “New Service”, and select “Storage Account”:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_18.png"&gt;&lt;IMG title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_8.png" width=510 height=193&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Fill out the service name, the public name and optionally choose a region.&amp;nbsp; You will be brought to a page that contains the following (note I rubbed out the access keys):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_20.png"&gt;&lt;IMG title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_9.png" width=448 height=263&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;19. You will use the first part of the endpoint, (jnakstorageaccount) and the one of the access keys to fill out your connection string.&lt;/P&gt;
&lt;P&gt;20. Open the WebRole1 config again, bring up Settings | DataConnectionString and fill out the account name and the account key and hit OK.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_22.png"&gt;&lt;IMG title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_10.png" width=400 height=250&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;21. Hit F5 to run the application again.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This time you will be running against cloud storage – note that the data you entered when running against the development storage is no longer there.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Important Note&lt;/STRONG&gt;: Before deploying to the cloud, the DiagnosticsConnectionString also needs to use storage account credentials and not the development storage account.&lt;/P&gt;
&lt;P&gt;Please see the &lt;A href="http://msdn.microsoft.com/en-us/library/ee460772.aspx"&gt;Deploying a Cloud Service&lt;/A&gt; walkthrough to learn how to deploy this to the Windows Azure cloud.&lt;/P&gt;
&lt;P&gt;For more information, please see the &lt;A href="http://msdn.microsoft.com/en-us/library/dd135733.aspx"&gt;Blob Service API documentation&lt;/A&gt; and the &lt;A href="http://go.microsoft.com/fwlink/?LinkId=153400"&gt;Programming Blob Storage&lt;/A&gt; white paper.&lt;/P&gt;
&lt;P&gt;I know that there are a number of different concepts that have to be pieced together, hopefully this walkthrough has been helpful in understand how everything fits together.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9944702" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="Storage" scheme="http://blogs.msdn.com/jnak/archive/tags/Storage/default.aspx" /><category term="blob storage" scheme="http://blogs.msdn.com/jnak/archive/tags/blob+storage/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /></entry><entry><title>Windows Azure Article in Visual Studio Magazine</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/01/08/windows-azure-article-in-visual-studio-magazine.aspx" /><id>http://blogs.msdn.com/jnak/archive/2010/01/08/windows-azure-article-in-visual-studio-magazine.aspx</id><published>2010-01-09T02:06:00Z</published><updated>2010-01-09T02:06:00Z</updated><content type="html">&lt;P&gt;Good article in Visual Studio Magazine this month on Windows Azure:&amp;nbsp; &lt;A href="http://visualstudiomagazine.com/Articles/2010/01/01/App-Dev-from-the-Ground-Up.aspx"&gt;http://visualstudiomagazine.com/Articles/2010/01/01/App-Dev-from-the-Ground-Up.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Ok, I might be a bit biased -- I get a few mentions in the article that I'm pretty jazzed about :)&lt;/P&gt;
&lt;P&gt;The quotes are from my session at PDC '09.&amp;nbsp; In case you missed it, you can always catch it here: &lt;A href="http://microsoftpdc.com/Sessions/SVC53" mce_href="http://microsoftpdc.com/Sessions/SVC53"&gt;&lt;FONT color=#006ff7&gt;Tips and Tricks for Using Visual Studio 2010 to Build Applications that Run on Windows Azure&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Kathleen, if you read this, thanks for the quotes! &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9946015" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /></entry><entry><title>Walkthrough: Windows Azure Table Storage (Nov 2009 and later)</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2010/01/06/walkthrough-windows-azure-table-storage-nov-2009-and-later.aspx" /><link rel="enclosure" type="application/x-zip-compressed" length="16943" href="http://blogs.msdn.com/jnak/attachment/9942724.ashx" /><id>http://blogs.msdn.com/jnak/archive/2010/01/06/walkthrough-windows-azure-table-storage-nov-2009-and-later.aspx</id><published>2010-01-06T18:20:00Z</published><updated>2010-01-06T18:20:00Z</updated><content type="html">&lt;P&gt;This walkthrough covers what I found to be the simplest way to get a sample up and running on Windows Azure that uses the Table Storage Service. It serves as an introduction to both Windows Azure cloud services as well as using table storage.&amp;nbsp; Although there is a wealth of information out there on Windows Azure - I try to tie together a lot of that information for folks of all levels to consume.&lt;/P&gt;
&lt;P&gt;I originally wrote &lt;A href="http://blogs.msdn.com/jnak/archive/2008/10/28/walkthrough-simple-table-storage.aspx"&gt;this walkthrough&lt;/A&gt; well over a year ago for our very first public release of Windows Azure at PDC ‘08.&lt;/P&gt;
&lt;P&gt;Much has changed in the last year, and this post is an update to that original post that will work with our PDC ‘09 and v1.0 release of the &lt;A href="http://go.microsoft.com/fwlink/?LinkID=128752"&gt;Windows Azure Tools&lt;/A&gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;So what's changed from a dev perspective?&amp;nbsp; Overall not a lot, mainly because table storage leverages ADO.NET Data Services and that is the core of how you work with Table Storage.&amp;nbsp; The way you connect to Windows Azure Storage has changed, namespaces, class names have changed and there have been a few other tweaks.&lt;/P&gt;
&lt;P&gt;To be clear, this post is not trying to be comprehensive or trying to dive deep in the technology, it just serves as an introduction to how the Table Storage Service works.&amp;nbsp; Also, please take a look at the &lt;A href="http://msdn.microsoft.com/en-us/library/dd203059.aspx" mce_href="http://msdn.microsoft.com/en-us/library/dd203059.aspx"&gt;Quick Lap Around the Tools&lt;/A&gt; before doing this walkthrough.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: &lt;A href="http://blogs.msdn.com/jnak/attachment/9942724.ashx" mce_href="http://blogs.msdn.com/jnak/attachment/9942724.ashx"&gt;The code for this walkthrough is attached to this blog post&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;After you have completed this walkthrough, you will have a Web Role that is a simple ASP.NET Web Application that shows a list of Contacts and allows you to add to and delete from that list. Each contact will have simplified information: just a name and an address (both strings).&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/SimpleTableStorageWalkthrough_DE36/image_2.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" border=0 alt=image src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/SimpleTableStorageWalkthrough_DE36/image_thumb.png" width=553 height=203&gt;&lt;/A&gt;&lt;/P&gt;
&lt;H3&gt;Table Storage Concepts&lt;/H3&gt;
&lt;P&gt;The Windows Azure Table Storage Services provides queryable structured storage. Each account can have 0..n tables, i.e. an unlimited number of tables and entities with no limit on the table size. (the combined size of an entity cannot exceed 1MB however)&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb.png" width=480 height=306&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Each entity and a table always has three properties, the PartitionKey, the RowKey and Timestamp that are not shown in above for space/legibility reasons.&amp;nbsp; Together these form a unique key for an entity.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Additionally, currently the only index and all results are returned sorted by PartitionKey and then by RowKey.&lt;/P&gt;
&lt;H3&gt;Design of the Sample&lt;/H3&gt;
&lt;P&gt;When a request comes in to the UI, it makes its way to the Table Storage Service as follows (click for larger size):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/SimpleTableStorageWalkthrough_DE36/clip_image002_2.gif"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=clip_image002 border=0 alt=clip_image002 src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/SimpleTableStorageWalkthrough_DE36/clip_image002_thumb.gif" width=609 height=59&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The UI class (the aspx page and its code behind) is data bound through an ObjectDataSource to the WebRole1.ContactDataSource which creates the connection to the Table Storage service gets the list of Contacts and Inserts to, and Deletes from, the Table Storage.&lt;/P&gt;
&lt;P&gt;The WebRole1.ContactDataModel class acts as the data model object and the WebRole1.ContactDataServiceContext derives from TableServiceContext which handles the authentication process and allows you to write LINQ queries, insert, delete and save changes to the Table Storage service.&lt;/P&gt;
&lt;H3&gt;Creating the Cloud Service Project&lt;/H3&gt;
&lt;P&gt;1. Start Visual Studio as an administrator (Screen shots below are from VS 2008, VS 2010 is also supported)&lt;/P&gt;
&lt;P&gt;2. Create a new project: File | New Project&lt;/P&gt;
&lt;P&gt;3. Under the Visual C# node (VB is also supported), select the “Cloud Service” project type then select the “Windows Azure Cloud Service” project template. Set the name to be “SimpleTableSample”. Hit OK to continue.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_1.png" width=558 height=173&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This will bring up a dialog to add Roles to the Cloud Service.&lt;/P&gt;
&lt;P&gt;4. Add an ASP.NET Web Role to the Cloud Service, we’ll use the default name of “WebRole1”.&amp;nbsp; Hit OK.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_2.png" width=393 height=247&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Solution explorer should look as follows:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_8.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_3.png" width=240 height=244&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;5. We now want to setup the the data model for the entity.&amp;nbsp; Right-click on WebRole1 in the Solution Explorer and select “Add Class”.&amp;nbsp; Call this class “ContactDataModel.cs” and hit OK.&lt;/P&gt;
&lt;P&gt;6.&amp;nbsp; Add a using directive to the storage client library – a .NET library for using Windows Azure Storage.&amp;nbsp; The assembly reference was already added by Visual Studio.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;Microsoft.WindowsAzure.StorageClient;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;7. Make the ContactDataModel class derive from the TableServiceEntity class. This brings in the PartitionKey, RowKey and Timestamp properties. (not necessary to derive from TableServiceEntity, but a convenience)&lt;/P&gt;
&lt;P&gt;8. For simplicity, we’ll just assign a new Guid as the PartitionKey to ensure uniqueness even though generally a GUID is not a good partition key.&amp;nbsp; If we were really building an address book, using a partition key that maps to a popular search field would be a good approach (contact name for example).&amp;nbsp; &lt;/P&gt;
&lt;P&gt;In this case, since the PartitionKey is set and the RowKey to is set to a constant hard coded value (String.Empty) the storage system distributes the data over many storage nodes prioritizing scalability (spreading load over multiple servers) over the faster performance of operations on multiple entities in a single partition. (entity locality)&lt;/P&gt;
&lt;P&gt;The key message here is that you’ll want to think about and make the right decision for your application/scenarios.&amp;nbsp; To learn more read the &lt;A href="http://go.microsoft.com/fwlink/?LinkId=153401"&gt;Programming Table Storage&lt;/A&gt; White Paper on windowsazure.com.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;public class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataModel &lt;/SPAN&gt;:&lt;SPAN style="COLOR: #2b91af"&gt;TableServiceEntity
&lt;/SPAN&gt;{
    &lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;ContactDataModel(&lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;partitionKey, &lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;rowKey)
        : &lt;SPAN style="COLOR: blue"&gt;base&lt;/SPAN&gt;(partitionKey, rowKey)
    {
    }

    &lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;ContactDataModel(): &lt;SPAN style="COLOR: blue"&gt;this&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #2b91af"&gt;Guid&lt;/SPAN&gt;.NewGuid().ToString(), &lt;SPAN style="COLOR: #2b91af"&gt;String&lt;/SPAN&gt;.Empty)
    {
    }

    &lt;SPAN style="COLOR: blue"&gt;public string &lt;/SPAN&gt;Name { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
    &lt;SPAN style="COLOR: blue"&gt;public string &lt;/SPAN&gt;Address { &lt;SPAN style="COLOR: blue"&gt;get&lt;/SPAN&gt;; &lt;SPAN style="COLOR: blue"&gt;set&lt;/SPAN&gt;; }
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;9. Now add the ContactDataServiceContext to the Web Role that derives from TableServiceContext.&amp;nbsp; Right click on WebRole1 and select Add | Class…&amp;nbsp; Name the class ContactDataServiceContext.cs.&lt;/P&gt;
&lt;P&gt;10.&amp;nbsp; Add the using directives.&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;Microsoft.WindowsAzure;
&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;Microsoft.WindowsAzure.StorageClient;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;11. Set the base class to be TableServiceContext.&lt;/P&gt;
&lt;P&gt;12. We’ll use the ContactDataServiceContext later to write queries, insert, remove and save changes to the table storage. One of the key things it does is provide the IQueryable&amp;lt;T&amp;gt; property that corresponds to a table.&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;public class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataServiceContext &lt;/SPAN&gt;: &lt;SPAN style="COLOR: #2b91af"&gt;TableServiceContext
&lt;/SPAN&gt;{
    &lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;ContactDataServiceContext(&lt;SPAN style="COLOR: blue"&gt;string &lt;/SPAN&gt;baseAddress, &lt;SPAN style="COLOR: #2b91af"&gt;StorageCredentials &lt;/SPAN&gt;credentials)
        : &lt;SPAN style="COLOR: blue"&gt;base&lt;/SPAN&gt;(baseAddress, credentials)
    {
    }

    &lt;SPAN style="COLOR: blue"&gt;public const string &lt;/SPAN&gt;ContactTableName = &lt;SPAN style="COLOR: #a31515"&gt;"ContactTable"&lt;/SPAN&gt;;

    &lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;IQueryable&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataModel&lt;/SPAN&gt;&amp;gt; ContactTable
    {
        &lt;SPAN style="COLOR: blue"&gt;get
        &lt;/SPAN&gt;{
            &lt;SPAN style="COLOR: blue"&gt;return this&lt;/SPAN&gt;.CreateQuery&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataModel&lt;/SPAN&gt;&amp;gt;(ContactTableName);
        }
    }
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Every IQueryable&amp;lt;T&amp;gt; property corresponds to a table in table storage.&lt;/P&gt;
&lt;P&gt;13. Let’s now add the ContactDataSource class. We'll fill this class out over the course of the next few steps.&amp;nbsp; This is the class the does all the hookup between the UI and the table storage service.&amp;nbsp; Right click on WebRole1 | Add | Class… and enter the file name to be “ContactDataSource.cs”.&lt;/P&gt;
&lt;P&gt;14. Add a reference to the System.Data.Services.Client assembly.&amp;nbsp; Right click on the References node under WebRole1 and select Add Reference…&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_10.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_4.png" width=244 height=133&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Then scroll down in the list and select System.Data.Services.Client and click OK.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_12.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_5.png" width=328 height=281&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;15. Now add the using directives to the top of the ContactDataSource.cs file.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;Microsoft.WindowsAzure;
&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;Microsoft.WindowsAzure.StorageClient;
&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;System.Data.Services.Client;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;16. For simplicity, use the instantiation of the ContactDataSource class as the location to setup the connection to Windows Azure Storage.&amp;nbsp; This involves reading a connection string from the Windows Azure settings and creating the ContactDataServiceContext with that connection information.&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;public class &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataSource
&lt;/SPAN&gt;{
    &lt;SPAN style="COLOR: blue"&gt;private &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataServiceContext &lt;/SPAN&gt;_ServiceContext = &lt;SPAN style="COLOR: blue"&gt;null&lt;/SPAN&gt;;

    &lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;ContactDataSource()
    {
        &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;storageAccount = &lt;SPAN style="COLOR: #2b91af"&gt;CloudStorageAccount&lt;/SPAN&gt;.FromConfigurationSetting(&lt;SPAN style="COLOR: #a31515"&gt;"DataConnectionString"&lt;/SPAN&gt;);
        _ServiceContext = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataServiceContext&lt;/SPAN&gt;(storageAccount.TableEndpoint.ToString(), storageAccount.Credentials);&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;17.&amp;nbsp; Setup the “DataConnectionString” setting by opening up the configuration UI for WebRole1.&amp;nbsp; Right click on the WebRole1 node under the Roles folder in the SimpleTableStorage cloud service project and select “Properties”.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_14.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_6.png" width=244 height=222&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;18. Switch to the Settings tab and click “Add Setting”.&amp;nbsp; Name it DataConnectionString, set the type to ConnectionString and click on the “…” button on the far right.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_16.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_7.png" width=538 height=380&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Hit “OK” to set the credentials to use Development Storage.&amp;nbsp; We’ll first get this sample working on development storage then convert it to use cloud storage later.&lt;/P&gt;
&lt;P&gt;19. If you actually instantiated the ContactDataSource and ran this app, you would find that the CloudStorageAccount.FromConfigurationSetting() call would fail with the following message:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;ConfigurationSettingSubscriber needs to be set before FromConfigurationSetting can be used&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This message is in fact incorrect – I have a bug filed to get this fixed and should be fixed in the next release (after our November 2009 release), to say “Configuration Setting Publisher” and not “ConfigurationSettingSubscriber”.&lt;/P&gt;
&lt;P&gt;To resolve this, we need to add a bit of template code to the WebRole.cs file in WebRole1.&amp;nbsp; Add the following to the WebRole.OnStart() method.&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;using &lt;/SPAN&gt;Microsoft.WindowsAzure;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;#region &lt;/SPAN&gt;Setup CloudStorageAccount Configuration Setting Publisher

&lt;SPAN style="COLOR: green"&gt;// This code sets up a handler to update CloudStorageAccount instances when their corresponding
// configuration settings change in the service configuration file.
&lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;CloudStorageAccount&lt;/SPAN&gt;.SetConfigurationSettingPublisher((configName, configSetter) =&amp;gt;
{
    &lt;SPAN style="COLOR: green"&gt;// Provide the configSetter with the initial value
    &lt;/SPAN&gt;configSetter(&lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironment&lt;/SPAN&gt;.GetConfigurationSettingValue(configName));

    &lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironment&lt;/SPAN&gt;.Changed += (sender, arg) =&amp;gt;
    {
        &lt;SPAN style="COLOR: blue"&gt;if &lt;/SPAN&gt;(arg.Changes.OfType&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironmentConfigurationSettingChange&lt;/SPAN&gt;&amp;gt;()
            .Any((change) =&amp;gt; (change.ConfigurationSettingName == configName)))
        {
            &lt;SPAN style="COLOR: green"&gt;// The corresponding configuration setting has changed, propagate the value
            &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;if &lt;/SPAN&gt;(!configSetter(&lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironment&lt;/SPAN&gt;.GetConfigurationSettingValue(configName)))
            {
                &lt;SPAN style="COLOR: green"&gt;// In this case, the change to the storage account credentials in the
                // service configuration is significant enough that the role needs to be
                // recycled in order to use the latest settings. (for example, the 
                // endpoint has changed)
                &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;RoleEnvironment&lt;/SPAN&gt;.RequestRecycle();
            }
        }
    };
});
&lt;SPAN style="COLOR: blue"&gt;#endregion&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;The comments (which I wrote and is included in the samples) should explain what is going on if you care to know.&amp;nbsp; In a nutshell, this code bridges the gap between the Microsoft.WindowsAzure.StorageClient assembly and the Microsoft.WindowsAzure.ServiceRuntime library – the Storage Client library is agnostic to the Windows Azure runtime as it can be used in non Windows Azure applications.&lt;/P&gt;
&lt;P&gt;This code essentially says how to get a setting value given a setting name and sets up an event handler to handle setting changes while running in the cloud (because the ServiceConfiguration.cscfg file was updated in the cloud).&lt;/P&gt;
&lt;P&gt;20. We need some code to ensure that the tables we rely on get created. Add the code to create the tables if they don't exist to the ContactDataSource constructor:&lt;/P&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;ContactDataSource()
{
    &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;storageAccount = &lt;SPAN style="COLOR: #2b91af"&gt;CloudStorageAccount&lt;/SPAN&gt;.FromConfigurationSetting(&lt;SPAN style="COLOR: #a31515"&gt;"DataConnectionString"&lt;/SPAN&gt;);
    _ServiceContext = &lt;SPAN style="COLOR: blue"&gt;new &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataServiceContext&lt;/SPAN&gt;(storageAccount.TableEndpoint.ToString(), storageAccount.Credentials);

    &lt;SPAN style="COLOR: green"&gt;// Create the tables
    // In this case, just a single table.  
    &lt;/SPAN&gt;storageAccount.CreateCloudTableClient().CreateTableIfNotExist(&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataServiceContext&lt;/SPAN&gt;.ContactTableName);
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: For production code you'll want to optimize the reading of the configuration settings and making a call to create the tables to improve perf -- the focus of this post is to keep things simple.&lt;/P&gt;
&lt;P&gt;Add the following code to the ContactDataSource.cs file:&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;&lt;SPAN style="COLOR: blue"&gt;public &lt;/SPAN&gt;&lt;SPAN style="COLOR: #2b91af"&gt;IEnumerable&lt;/SPAN&gt;&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataModel&lt;/SPAN&gt;&amp;gt; Select()
{
    &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;results = &lt;SPAN style="COLOR: blue"&gt;from &lt;/SPAN&gt;c &lt;SPAN style="COLOR: blue"&gt;in &lt;/SPAN&gt;_ServiceContext.ContactTable
                  &lt;SPAN style="COLOR: blue"&gt;select &lt;/SPAN&gt;c;

    &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;query = results.AsTableServiceQuery&amp;lt;&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataModel&lt;/SPAN&gt;&amp;gt;();
    &lt;SPAN style="COLOR: blue"&gt;var &lt;/SPAN&gt;queryResults = query.Execute();

    &lt;SPAN style="COLOR: blue"&gt;return &lt;/SPAN&gt;queryResults;
}

&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;Delete(&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataModel &lt;/SPAN&gt;itemToDelete)
{
    _ServiceContext.AttachTo(&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataServiceContext&lt;/SPAN&gt;.ContactTableName, itemToDelete, &lt;SPAN style="COLOR: #a31515"&gt;"*"&lt;/SPAN&gt;);
    _ServiceContext.DeleteObject(itemToDelete);
    _ServiceContext.SaveChanges();
}

&lt;SPAN style="COLOR: blue"&gt;public void &lt;/SPAN&gt;Insert(&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataModel &lt;/SPAN&gt;newItem)
{
    _ServiceContext.AddObject(&lt;SPAN style="COLOR: #2b91af"&gt;ContactDataServiceContext&lt;/SPAN&gt;.ContactTableName, newItem);
    _ServiceContext.SaveChanges();
}&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: in the Select() method, the TableServiceQuery&amp;lt;T&amp;gt; class enables you to have finer grained control over how you get the data.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: the use of AttachTo() in the Delete() method to connect to and remove the row.&lt;/P&gt;
&lt;P&gt;22. The UI is defined in the aspx page and consists of 3 parts. The GridView which will display all of the rows of data, the FormView which allows the user to add rows and the ObjectDataSource which databinds the UI to the ContactDataSource.&lt;/P&gt;
&lt;P&gt;23. The GridView is placed after the first &amp;lt;div&amp;gt;. Note that in this sample, we’ll just auto-generate the columns and show the delete button. The DataSourceId is set the ObjectDataSource which will be covered below.&lt;/P&gt;&lt;PRE class=code&gt;    &lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;GridView
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="contactsView"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataSourceId&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="contactData"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataKeyNames&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="PartitionKey"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;AllowPaging&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="False"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;AutoGenerateColumns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="True"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;GridLines&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Vertical"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" 
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;BackColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="White" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ForeColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Black"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;BorderColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="#DEDFDE" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;BorderStyle&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="None" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;BorderWidth&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="1px" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;CellPadding&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="4"&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Columns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;CommandField &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ShowDeleteButton&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="true"  /&amp;gt;
        &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Columns&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;RowStyle &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;BackColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="#F7F7DE" /&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;FooterStyle &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;BackColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="#CCCC99" /&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;PagerStyle &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;BackColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="#F7F7DE" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ForeColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Black" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;HorizontalAlign&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Right" /&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;SelectedRowStyle &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;BackColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="#CE5D5A" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Font-Bold&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="True" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ForeColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="White" /&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;HeaderStyle &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;BackColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="#6B696B" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Font-Bold&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="True" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ForeColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="White" /&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;AlternatingRowStyle &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;BackColor&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="White" /&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;GridView&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;    &lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;24. The Form view to add rows is really simple, just labels and text boxes with a button at the end to raise the “Insert” command. Note that the DataSourceID is again set to the ObjectDataProvider and there are bindings to the Name and Address.&lt;/P&gt;&lt;PRE class=code&gt;    &lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;br &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;        
    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;FormView
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="frmAdd"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataSourceId&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="contactData"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DefaultMode&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Insert"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;InsertItemTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Label
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="nameLabel"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Name:"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;AssociatedControlID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="nameBox"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;TextBox
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="nameBox"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;='&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;# Bind("Name") &lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;'
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;br &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Label
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="addressLabel"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Address:"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;AssociatedControlID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="addressBox"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;TextBox
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="addressBox"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;='&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;# Bind("Address") &lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;'
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" /&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;br &lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;/&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;Button
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;id&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="insertButton"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Text&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Add"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;CommandName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Insert"
                    &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;Runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server"/&amp;gt;
        &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;InsertItemTemplate&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;FormView&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;25. The final part of the aspx is the definition of the ObjectDataSource. See how it ties the ContactDataSource and the ContactDataModel together with the GridView and FormView.&lt;/P&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;&lt;PRE class=code&gt;    &lt;SPAN style="BACKGROUND: #ffee62"&gt;&amp;lt;%&lt;/SPAN&gt;&lt;SPAN style="COLOR: green"&gt;-- Data Sources --&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND: #ffee62"&gt;%&amp;gt;
&lt;/SPAN&gt;    &lt;SPAN style="COLOR: blue"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ObjectDataSource &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;runat&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="server" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="contactData"     &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;TypeName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="WebRole1.ContactDataSource"
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DataObjectTypeName&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="WebRole1.ContactDataModel" 
        &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;SelectMethod&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Select" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;DeleteMethod&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Delete" &lt;/SPAN&gt;&lt;SPAN style="COLOR: red"&gt;InsertMethod&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;="Insert"&amp;gt;    
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;asp&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;:&lt;/SPAN&gt;&lt;SPAN style="COLOR: #a31515"&gt;ObjectDataSource&lt;/SPAN&gt;&lt;SPAN style="COLOR: blue"&gt;&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;26. Build. You should not have any compilation errors.&lt;/P&gt;
&lt;P&gt;27. F5 to debug. You will see the app running in the Development Fabric using the Table Development Storage &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/SimpleTableStorageWalkthrough_DE36/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" border=0 alt=image src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/SimpleTableStorageWalkthrough_DE36/image_thumb_1.png" width=543 height=199&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;28. Now I want to switch this to use Windows Azure Storage, not the development storage.&amp;nbsp; The first step is to go to the &lt;A href="http://windows.azure.com/"&gt;Windows Azure Developer Portal&lt;/A&gt; and create a storage account.&lt;/P&gt;
&lt;P&gt;Login and click on “New Service”, and select “Storage Account”:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_18.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_8.png" width=510 height=193&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Fill out the service name, the public name and optionally choose a region.&amp;nbsp; You will be brought to a page that contains the following (note I rubbed out the access keys):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_20.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_9.png" width=448 height=263&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;29. You will use the first part of the endpoint, (jnakstorageaccount) and the one of the access keys to fill out your connection string.&lt;/P&gt;
&lt;P&gt;30. Open the WebRole1 config again, bring up Settings | DataConnectionString and fill out the account name and the account key and hit OK.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_22.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/WalkthroughWindowsAzureTableStorageNov20_B8E1/image_thumb_10.png" width=400 height=250&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;31. Hit F5 to run the application again.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;This time you will be running against cloud storage – note that the data you entered when running against the development storage is no longer there.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Important Note&lt;/STRONG&gt;: Before deploying to the cloud, the DiagnosticsConnectionString also needs to use storage account credentials and not the development storage account.&lt;/P&gt;
&lt;P&gt;32. Please see the &lt;A href="http://msdn.microsoft.com/en-us/library/ee460772.aspx"&gt;Deploying a Cloud Service&lt;/A&gt; walkthrough to learn how to deploy this to the Windows Azure cloud.&lt;/P&gt;
&lt;P&gt;And there you have it, a walkthrough of using Windows Azure Table Storage – for more information and to dig deeper, definitely check out the white paper here: &lt;A title="Windows Azure Table – Programming Table Storage" href="http://go.microsoft.com/fwlink/?LinkId=153401"&gt;Windows Azure Table – Programming Table Storage&lt;/A&gt; and the docs in MSDN that cover what subsets of ADO.NET Data Services work with table storage here: &lt;A href="http://msdn.microsoft.com/en-us/library/dd135720.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd135720.aspx&lt;/A&gt; and here: &lt;A href="http://msdn.microsoft.com/en-us/library/dd894032.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd894032.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9942724" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="walkthrough" scheme="http://blogs.msdn.com/jnak/archive/tags/walkthrough/default.aspx" /><category term="table storage" scheme="http://blogs.msdn.com/jnak/archive/tags/table+storage/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /><category term="Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Azure/default.aspx" /></entry><entry><title>How to: Add an HTTPS Endpoint to a Windows Azure Cloud Service</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2009/12/01/how-to-add-an-https-endpoint-to-a-windows-azure-cloud-service.aspx" /><id>http://blogs.msdn.com/jnak/archive/2009/12/01/how-to-add-an-https-endpoint-to-a-windows-azure-cloud-service.aspx</id><published>2009-12-01T20:50:00Z</published><updated>2009-12-01T20:50:00Z</updated><content type="html">&lt;P&gt;Back in May I posted about &lt;A href="http://blogs.msdn.com/jnak/archive/2009/05/12/https-endpoint-on-windows-azure.aspx" mce_href="http://blogs.msdn.com/jnak/archive/2009/05/12/https-endpoint-on-windows-azure.aspx"&gt;Adding an HTTPS Endpoint to a Windows Azure Cloud Service&lt;/A&gt; and with the November 2009 release of the Windows Azure Tools, that article is now obsolete.&lt;/P&gt;
&lt;P&gt;In the last week I received a number of requests to post a new article about how to add HTTPS endpoints with the November 2009 release and later and I’m always happy to oblige!&lt;/P&gt;
&lt;P&gt;To illustrate how to add an HTTPS endpoint to a Cloud Service, I’ll start with the thumbnail sample from the Windows Azure SDK – the web role in that sample only has an http endpoint and I’ll walkthrough the steps to add an HTTPS endpoint to that web role.&lt;/P&gt;
&lt;P&gt;Open the Windows Azure SDK folder, for me, that's C:\Program Files\Windows Azure SDK\v1.0 and unzip the samples-cs.zip file to a writeable location.&lt;/P&gt;
&lt;P&gt;In the samples folder, there is a sample called “Thumbnails”, open the solution Thumbnails.sln in Visual Studio. (2008 or 2010 will work)&lt;/P&gt;
&lt;P&gt;Hit F5 to run the application and make sure everything works as expected.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;If you aren’t familiar with this sample, it allows you to select an image locally via the web role which will upload that image to blob storage and will communicate the location to the worker via a queue.&amp;nbsp; The worker will generate a thumbnail for that image and the web role displays the thumbnail.&lt;/P&gt;
&lt;P&gt;The process to add an HTTPS endpoint is a 3 step process. &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Configure the endpoint&lt;/LI&gt;
&lt;LI&gt;Upload the certificate to the Cloud&lt;/LI&gt;
&lt;LI&gt;Configure the SSL certificate (and then point the endpoint to that certificate)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Adding the HTTPS Endpoint&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To configure the endpoint, open up the configuration UI on the WebRole by right clicking on the Thumbnails_WebRole node under the Roles node in the Solution Explorer and selecting “Properties”.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_14.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_6.png" width=244 height=199 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Switch to the Endpoints tab and click the checkbox to select “HTTPS”.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_16.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_7.png" width=321 height=184 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_7.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This will add the HTTPS endpoint but not specify the certificate.&lt;/P&gt;
&lt;P&gt;Switch to the Configuration page and uncheck the Launch browser for: HTTP endpoint option, by unselecting this option, on run or debug of the cloud service, the default browser will only be launched for the HTTPS endpoint.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_18.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_8.png" width=308 height=210 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;HTTPS Endpoints on the Local Development Fabric&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Click on the Debug menu, Debug | Start Debugging to package and run the cloud service on the local development fabric.&lt;/P&gt;
&lt;P&gt;The development simulation always uses a self-signed certificate issued to and issued by 127.0.0.1 which corresponds to the local host. This certificate is installed as part of the Windows Azure Tools + SDK.&lt;/P&gt;
&lt;P&gt;This is an important thing to note as the certificate configuration I'm about to describe below only applies when the application is running on the cloud.&lt;/P&gt;
&lt;P&gt;By default, this certificate is not root trusted and running an application with an https endpoint on the development fabric will result in a certificate error on the local development fabric.&amp;nbsp; Click on “Continue to this website (not recommended)” to browse to the web site:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_3.png" width=366 height=148 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;For more information about the certificate Windows Azure installs including how to get rid of the certificate error&amp;nbsp;when running on the development fabric&amp;nbsp;-- see the end of this post.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The Certificate&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To configure a certificate for use in the cloud, you will need a certificate which will be uploaded to the cloud and to configure that certificate for the role.&lt;/P&gt;
&lt;P&gt;For the purpose of this article, we’ll create and use a self-signed certificate. Create a self-signed certificate by opening the IIS Manager.&lt;/P&gt;
&lt;P&gt;Open the IIS Manager and select “Server Certificates”.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HTTPSEndpointonWindowsAzure_A5A6/image_2.png" width=401 height=284 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HTTPSEndpointonWindowsAzure_A5A6/image_2.png"&gt;&lt;/P&gt;
&lt;P&gt;Select “Create Self-Signed Certificate…” under the “Actions” heading on the far right of the dialog.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_6.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_2.png" width=367 height=191 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_2.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;After creating the cert, click on “Export…” to export the certificate to a pfx file. Provide a password you’ll remember.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_28.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_28.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_13.png" width=224 height=244 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_13.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The benefit of using IIS to create the certificate is that it is the easiest way I know to create a certificate that has the appropriate settings and an exportable private key. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Uploading the Certificate&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;We’ll now proceed with the upload step. Navigate the to Windows Azure Developer Portal and select a Hosted Service – this will be the same Hosted Service that you will deploy your application to later.&lt;/P&gt;
&lt;P&gt;On the Certificates heading at the bottom of that page, select “Manage”.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_30.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_30.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_14.png" width=344 height=279 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_14.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This will bring you to the following page:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_32.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_32.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_15.png" width=409 height=142 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_15.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Upload the certificate by entering the name of the pfx file and the corresponding password you entered during the export step above and click “upload”&lt;/P&gt;
&lt;P&gt;Copy the certificate Thumbprint to your clipboard after it is installed to your Hosted Service Component.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_34.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_34.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_16.png" width=397 height=96 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_16.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Configuring the Certificate&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Go back to the Visual Studio Thumbnails_WebRole configuration UI, click on the Certificates tab and click “Add Certificate”. &lt;/P&gt;
&lt;P&gt;Give the certificate a name (i.e. sslCert), paste in the Thumbprint in the Thumbprint field (you copied it to your clipboard after uploading the certificate to the portal) and leave the store location and name at the default of LocalMachine and My.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_36.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_36.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_17.png" width=524 height=156 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_17.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The certificates configuration page allows you to specify for a given role what certificates should be installed to the VM instances for that role and in which stores to install those certificates.&lt;/P&gt;
&lt;P&gt;In this case, you are telling Windows Azure to install the certificate you uploaded via the Portal to all VM instances that are created for the Thumbnails_WebRole web role.&lt;/P&gt;
&lt;P&gt;Switch to the Endpoints tab and select “sslCert” for the HTTPS certificate.&lt;/P&gt;
&lt;P&gt;Now deploy your application to the same Hosted Service in the Cloud where you uploaded the certificate. &lt;/P&gt;
&lt;P&gt;Once the application is deployed, you will be able to access it via http and https. You can see from the screen shot below, the certificate I uploaded is being used for the https endpoint for the cloud service I deployed: &lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_40.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_40.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_19.png" width=388 height=182 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_19.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Note&lt;/STRONG&gt;: Since we uploaded a self-signed certificate, your web browser will display a certificate error when browsing to your https endpoint, using a real signed certificate will solve this problem.&lt;/P&gt;
&lt;P&gt;Also note that you may have to add intermediate certificates to complete the certificate chain.&amp;nbsp; You can do this by uploading additional certificates via the Portal and configuring those certificates in the Certificates tab of the role configuration UI. (more on this in a subsequent post)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Known Issues:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;If you forget to set the SSL certificate name for the HTTPS endpoint on the Endpoints page of the role configuration UI, you'll still be able to run on the local development fabric (as per above, it always uses the installed certificate) but when you publish, it will fail with an error in the error list:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;No SSL certificate specified for https input endpoint 'HttpsIn' of role 'Thumbnails_WebRole'&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Windows Explorer (and your default browser) will still come up and the Thumbnails.cspkg file will appear as a 0 byte file which is misleading.&amp;nbsp; We will be fixing this in a future release such that it is more obvious that there was an error.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Specifying the SSL Certificate Used by the Development Fabric to be Trusted&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;To find the certificate that is installed by Windows Azure, run the Microsoft Management Console by typing “mmc" from in the start menu.&lt;/P&gt;
&lt;P&gt;Select “Add/Remove Snap-in…”:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_20.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_20.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_9.png" width=244 height=147 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_9.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;And select “Certificates”, “Computer Account”:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_22.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_22.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_10.png" width=244 height=242 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_10.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Click “Next” for “Local Computer. then hit “OK”.&lt;/P&gt;
&lt;P&gt;Under Personal\Certificates, you will see the 127.0.01 certificate that was installed.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_24.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_24.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_11.png" width=397 height=107 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_11.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Because the certificate is not root trusted, it’s installed to the Personal store, when you run applications that have an SSL endpoint on the local development fabric, the web browser will come up with a certificate error indicating that “There is a problem with this website’s security certificate”.&lt;/P&gt;
&lt;P&gt;This is expected. Click on “Continue to this website (not recommended)” to browse to the web site:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_3.png" width=366 height=148 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;If you would like to make the certificate root trusted and therefore not see the Certificate errors, you can install the certificate to the “Trusted Root Certification Authorities” Certificate store. Simply drag it to the “Trusted Root Certification Authorities” folder in the mmc window. (you can also move it to the Current User TRCA store if you prefer)&lt;/P&gt;
&lt;P&gt;To be on the safe side, please don’t trust any HTTPS web sites with any valued information on a machine where you have made this change.&lt;/P&gt;
&lt;P&gt;Now if you made the 127.0.0.1 certificate root trusted, when you run the application, the web site will come up without the error:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_26.png" mce_href="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_26.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://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_12.png" width=317 height=129 mce_src="http://blogs.msdn.com/blogfiles/jnak/WindowsLiveWriter/HowtoAddanHTTPSEndpointtoaWindowsAzureCl_FE35/image_thumb_12.png"&gt;&lt;/A&gt; &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9930514" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="ASP.Net" scheme="http://blogs.msdn.com/jnak/archive/tags/ASP.Net/default.aspx" /><category term="ssl" scheme="http://blogs.msdn.com/jnak/archive/tags/ssl/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /></entry><entry><title>Web Site Projects and Windows Azure</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/jnak/archive/2009/11/30/web-site-projects-and-windows-azure.aspx" /><id>http://blogs.msdn.com/jnak/archive/2009/11/30/web-site-projects-and-windows-azure.aspx</id><published>2009-11-30T19:00:00Z</published><updated>2009-11-30T19:00:00Z</updated><content type="html">&lt;P&gt;Currently (November 2009), the Windows Azure Tools for Visual Studio only support Web Application projects – the type of Web projects that have a project file and are compiled.&lt;/P&gt;
&lt;P&gt;For most folks, they reason to choose a Web Site project was for the ability to update it easily on the server and generally, the target customer for Windows Azure is typically using a Web Application project. (for a good article about the differences and when to use each one, please &lt;A href="http://vishaljoshi.blogspot.com/2009/08/web-application-project-vs-web-site.html" mce_href="http://vishaljoshi.blogspot.com/2009/08/web-application-project-vs-web-site.html"&gt;see this post&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;Because Windows Azure has a deployment model where you can’t update the files on the server itself and considering the target customer, this seemed like a reasonable approach.&lt;/P&gt;
&lt;P&gt;That said, there are a lot of apps out there that are in the Web Site format that folks want to deploy to Windows Azure and we’re figuring out the best way to support this moving forward.&lt;/P&gt;
&lt;P&gt;For the time being, most folks are doing the conversion from Web Site to Web Application project and I wanted to point to a good post off the Visual Web Developer blog that will help make this easier: &lt;A title=http://blogs.msdn.com/webdevtools/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx href="http://blogs.msdn.com/webdevtools/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx" mce_href="http://blogs.msdn.com/webdevtools/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx"&gt;http://blogs.msdn.com/webdevtools/archive/2009/10/29/converting-a-web-site-project-to-a-web-application-project.aspx&lt;/A&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9928318" width="1" height="1"&gt;</content><author><name>jnak</name><uri>http://blogs.msdn.com/members/jnak.aspx</uri></author><category term="Visual Studio 2008" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio+2008/default.aspx" /><category term="Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Visual+Studio/default.aspx" /><category term="Windows Azure Tools for Microsoft Visual Studio" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Tools+for+Microsoft+Visual+Studio/default.aspx" /><category term="Windows Azure" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure/default.aspx" /><category term="ASP.Net" scheme="http://blogs.msdn.com/jnak/archive/tags/ASP.Net/default.aspx" /><category term="visual studio 2010" scheme="http://blogs.msdn.com/jnak/archive/tags/visual+studio+2010/default.aspx" /><category term="Windows Azure SDK" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+SDK/default.aspx" /><category term="Windows Azure Platform" scheme="http://blogs.msdn.com/jnak/archive/tags/Windows+Azure+Platform/default.aspx" /></entry></feed>