<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Sean Iannuzzi's Blog</title><link>http://weblogs.asp.net/seaniannuzzi/default.aspx</link><description>I am a Solutions Architect leveraging best practices for Enterprise, System and Software Design from Philadelphia.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>WCF Diagnostics Implementation in 5 Easy Steps</title><link>http://weblogs.asp.net/seaniannuzzi/archive/2011/10/21/wcf-diagnostics-implementation-in-5-easy-steps.aspx</link><pubDate>Fri, 21 Oct 2011 18:14:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:8001941</guid><dc:creator>seaniannuzzi</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/seaniannuzzi/rsscomments.aspx?PostID=8001941</wfw:commentRss><comments>http://weblogs.asp.net/seaniannuzzi/archive/2011/10/21/wcf-diagnostics-implementation-in-5-easy-steps.aspx#comments</comments><description>&lt;h1&gt;Overview&lt;/h1&gt;  &lt;p&gt;As we are all aware debugging components in a service oriented architecture it is generally a struggle without having to write a fair amount of code to trace and log the information.&amp;nbsp; Even using common utilities such as Log4Net or the Enterprise Libraries it still requires you to capture the information you want to have logged.&amp;nbsp; To my surprise this is no longer the case with Windows Communication Foundation Services Tracing Capabilities.&lt;/p&gt;  &lt;p&gt;There are so many features on how to implement WCF debugging, errors logging and tracing that I am only going to focus on a very simple case for the sake of simplicity.&amp;nbsp; With that said, I am only going to show a few different settings that will establish a level of diagnostics that in most cases should be found very useful.&amp;nbsp;&amp;nbsp; Especially in cases where you need to show what package and payload information was sent to and received from client’s consuming services.&lt;/p&gt;    &lt;p&gt;Let’s get started…..&lt;/p&gt;    &lt;h1&gt;Step 1: Create a new WCF Service Application&lt;/h1&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_6B916BC8.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_6B916BC8.png"&gt;&lt;img style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_5CE6BFE3.png" width="553" height="413" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_5CE6BFE3.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h1&gt;&amp;nbsp;&lt;/h1&gt;  &lt;h1&gt;Step 2:&amp;nbsp; Open the Web.Config and Add the Following Sections&lt;/h1&gt;  &lt;p&gt;&amp;lt;system.diagnostics&amp;gt;    &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;trace autoflush="true" /&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sources&amp;gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;source name="System.ServiceModel"     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switchValue="Information, ActivityTracing"     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;listeners&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add name="xml"/&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/listeners&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/source&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;source name="System.ServiceModel.MessageLogging"&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;listeners&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add name="xml"/&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/listeners&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/source&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/sources&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sharedListeners&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add name="xml"     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; type="System.Diagnostics.XmlWriterTraceListener"     &lt;br&gt;&amp;nbsp; initializeData= "C:\temp\WCFDiagnosticsExample.svclog" /&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/sharedListeners&amp;gt;     &lt;br&gt;&amp;nbsp; &amp;lt;/system.diagnostics&amp;gt;&lt;/p&gt;&amp;nbsp; &lt;p&gt;&amp;lt;!--&lt;/p&gt;  &lt;p&gt;Add this in your “system.serviceModel” section.&lt;/p&gt;  &lt;p&gt;--&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;diagnostics&amp;gt;    &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;messageLogging     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logEntireMessage="true"     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logMalformedMessages="true"     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logMessagesAtServiceLevel="true"     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; logMessagesAtTransportLevel="true"     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; maxMessagesToLog="3000"     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/diagnostics&amp;gt;&lt;/p&gt;    &lt;h1&gt;Step 3:&amp;nbsp; Run the Service&lt;/h1&gt;  &lt;p&gt;The next step is to simply run your service and you should see the svclog file created in the directory you specified.&lt;/p&gt;    &lt;h1&gt;Step 4: Open the service log file using the WCF Service Trace Viewer (svctraceviewer.exe)&lt;/h1&gt;    &lt;p&gt;a ) Launch the WCF Service Trace Viewer (svctraceviewer.exe) as show below&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_159169F1.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_159169F1.png"&gt;&lt;img style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_3135F5E7.png" width="601" height="123" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_3135F5E7.png"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;b) Next select your log file from the location and path you specified in your web.config.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_09FBACB2.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_09FBACB2.png"&gt;&lt;img style="border-width: 0px; padding-top: 0px; padding-right: 0px; padding-left: 0px; display: inline; background-image: none;" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_228B4A02.png" width="596" height="386" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_228B4A02.png"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;h2&gt;Note:&lt;/h2&gt;  &lt;ul&gt;   &lt;li&gt;What is great is that you now have the XML data that was sent to your service and the XML that was sent from your service.&amp;nbsp; &lt;br&gt;&lt;/li&gt;    &lt;li&gt;You also have the exception that was thrown and any details related to the call stack.&amp;nbsp;&amp;nbsp; &lt;br&gt;&lt;/li&gt;    &lt;li&gt;The data that is in the trace also includes your data contracts received and returned with all data captured which is perfect when you have to show what data you received versus what was sent to your service. &lt;/li&gt; &lt;/ul&gt;    &lt;h1&gt;Additional Features and Custom Tracing&lt;/h1&gt;  &lt;p&gt;As easy as it was to enable the tracing you can add your own custom trace as well simply by adding in your own custom trace source and a few lines of code.&amp;nbsp; &lt;/p&gt;    &lt;h2&gt;Step 5: Add Custom Trace&lt;/h2&gt;  &lt;p&gt;a) The quick and simple way to accomplish this is to add your own Custom Trace Source to the diagnostics information.&lt;/p&gt;  &lt;p&gt;&amp;lt;source name="CustomTrace"    &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switchValue="Information, ActivityTracing"     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;listeners&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;add name="xml"/&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/listeners&amp;gt;     &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/source&amp;gt;     &lt;br&gt;&lt;/p&gt;  &lt;p&gt;b) then add the necessary code in your service to log any information needed.&lt;/p&gt;  &lt;p&gt;TraceSource traceSource = new TraceSource("CustomTrace");    &lt;br&gt;traceSource.TraceData(TraceEventType.Information, 0, "WCF Diagnostics Trace Example");     &lt;br&gt;traceSource.Flush();&lt;/p&gt;  &lt;p&gt;(assumes you added “using System.Diagnostics;” to the top of the class)&lt;/p&gt;    &lt;h1&gt;Summary&lt;/h1&gt;  &lt;p&gt;In 5 easy steps we now have enabled logging, tracing, and a custom trace various details about the WCF Service.&lt;/p&gt;    &lt;h2&gt;References and Links&lt;/h2&gt;  &lt;p&gt;Service Trace Viewer : &lt;a title="http://msdn.microsoft.com/en-us/library/ms732023.aspx" href="http://msdn.microsoft.com/en-us/library/ms732023.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms732023.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms732023.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Service Model Registration Tool: &lt;a title="http://msdn.microsoft.com/en-us/library/ms732012.aspx" href="http://msdn.microsoft.com/en-us/library/ms732012.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms732012.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms732012.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Configuration Editor: &lt;a title="http://msdn.microsoft.com/en-us/library/ms732009.aspx" href="http://msdn.microsoft.com/en-us/library/ms732009.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms732009.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms732009.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=8001941" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Storage/default.aspx">Storage</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/.NET+FAQ/default.aspx">.NET FAQ</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/FAQ/default.aspx">FAQ</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/WCF/default.aspx">WCF</category></item><item><title>Windows Azure–Windows Azure Cloud Project Deployment and Remote Connections</title><link>http://weblogs.asp.net/seaniannuzzi/archive/2011/09/19/windows-azure-windows-azure-cloud-project-deployment-and-remote-connections.aspx</link><pubDate>Mon, 19 Sep 2011 14:46:53 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7958014</guid><dc:creator>seaniannuzzi</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/seaniannuzzi/rsscomments.aspx?PostID=7958014</wfw:commentRss><comments>http://weblogs.asp.net/seaniannuzzi/archive/2011/09/19/windows-azure-windows-azure-cloud-project-deployment-and-remote-connections.aspx#comments</comments><description>&lt;h1&gt;Overview&lt;/h1&gt;  &lt;p&gt;There are several options when deploying your solution to Windows Azure and based on the types of updates required it may be best for you to leverage each of the deployment options in different ways and at different times.&amp;#160; In this blog post I am going to focus on the most common deployment options available and then discuss when and why to use one deployment method versus another.&amp;#160; For the purposes of keeping this post as simple as possible, I am not going to focus on a multi region deployment and am only going to focus on a single region deployment.&lt;/p&gt;  &lt;h2&gt;&amp;#160;&lt;/h2&gt;  &lt;h2&gt;The Quick Read for this Post&lt;/h2&gt;  &lt;p&gt;The quick and easy read on this post is to look at the “&lt;em&gt;Quick Deployment Options Benefit List&lt;/em&gt;” and determine what types are more common in your organization or for your project.&amp;#160; In most cases, it should be pretty clear what Deployment Option would be most appropriate for your needs.&amp;#160; Based on the Option that seems best, refer to that section of the post. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Option 1:&amp;#160; Publish Locally – With Manual Service Package Deployment&lt;/h2&gt;  &lt;p&gt;Option 1 entails creating the Windows Azure Service Package files locally and then manually uploading them to the Windows Azure. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Option 2: Publish Remotely – With Automated Package Deployment&lt;/h2&gt;  &lt;p&gt;Option 2 automatically will publish the “&lt;em&gt;service configuration&lt;/em&gt;” and “&lt;em&gt;package&lt;/em&gt;” files to Windows Azure based on the credentials, environment, and storage account selected.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Option 3: Publish Remotely – Remote Desktop Session&lt;/h2&gt;  &lt;p&gt;Option 3 automatically will publish the “&lt;em&gt;service configuration&lt;/em&gt;” and “&lt;em&gt;package&lt;/em&gt;” files to Windows Azure based on the credentials, environment, and storage account selected and will also allow you to connect to your Windows Azure Cloud instance remotely.&amp;#160; The remote connection will provide benefits for IIS Administration, File Explorer, Copy/Paste, quick file updates, and Remote Server Administration.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1&gt;Quick Deployment Options Benefit List&lt;/h1&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="100%"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;&lt;strong&gt;Option 1 – Manual&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="162"&gt;&lt;strong&gt;Option 2 – Publish Remote &lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="219"&gt;&lt;strong&gt;Option 3 – Publish Remote with Remote Desktop Session&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Initial Setup for Deployment&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;average&lt;/td&gt;        &lt;td valign="top" width="162"&gt;easy&lt;/td&gt;        &lt;td valign="top" width="219"&gt;involved&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Create New Instances&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;X&lt;/td&gt;        &lt;td valign="top" width="162"&gt;X&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Update Instances&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;X&lt;/td&gt;        &lt;td valign="top" width="162"&gt;X&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;IIS Administration&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="162"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Support IIS Recycle&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="162"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Supports Copy/Paste&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="162"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Support File Explorer&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="162"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;File Updates&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;(requires instance updates)&lt;/td&gt;        &lt;td valign="top" width="162"&gt;(requires instance updates)&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X – very easy&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Projected Update Time&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;15m – 2 hours&lt;/td&gt;        &lt;td valign="top" width="162"&gt;15m – 2 hours&lt;/td&gt;        &lt;td valign="top" width="219"&gt;as fast as it take to copy files&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Ease of Updates&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;Very time consuming&lt;/td&gt;        &lt;td valign="top" width="162"&gt;Very time consuming&lt;/td&gt;        &lt;td valign="top" width="219"&gt;easy and convenient &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Knowledge of IIS Needed (app pools, etc)&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;No&lt;/td&gt;        &lt;td valign="top" width="162"&gt;No&lt;/td&gt;        &lt;td valign="top" width="219"&gt;Yes (true remote desktop session)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Server Knowledge Needed&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;No&lt;/td&gt;        &lt;td valign="top" width="162"&gt;No&lt;/td&gt;        &lt;td valign="top" width="219"&gt;Yes (true remote desktop session)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Restart Instance&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;partially - (in dashboard only)&lt;/td&gt;        &lt;td valign="top" width="162"&gt;partially - (in dashboard only)&lt;/td&gt;        &lt;td valign="top" width="219"&gt;Yes&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Experience Level&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;Novice to Expert&lt;/td&gt;        &lt;td valign="top" width="162"&gt;Novice to Expert&lt;/td&gt;        &lt;td valign="top" width="219"&gt;Intermediate to Export&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Risk Level&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;Medium&lt;/td&gt;        &lt;td valign="top" width="162"&gt;Low&lt;/td&gt;        &lt;td valign="top" width="219"&gt;High&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;There are many more features and benefits to each of these options, but hopefully this chart is found helpful when deciding what deployment method to use for your Windows Azure Cloud Deployments.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1&gt;Summary&lt;/h1&gt;  &lt;p&gt;Based on these options you may be wondering why you would need to use one deployment option versus another or how this could impact you on a project.&amp;#160; The simple answer is fairly straight forward.&amp;#160; If you decide to publish your application after each change, it is likely that you are going to have to wait for your instances to be recreated.&amp;#160; This process of Windows Azure stopping the instances, and recreating them is very time consuming and definitely not preferred if you are use to deploying your applications internally.&amp;#160; With Windows Azure this initial process could take as short as 15 minutes or several hours.&amp;#160; Rest assure if you have not reviewed the chart above you are spending way too much time deploying your solution to the Cloud, especially for simple updates.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1&gt;Preliminary Setup&lt;/h1&gt;  &lt;p&gt;With that said, let’s get started by creating a Windows Azure Cloud Project.&amp;#160; &lt;/p&gt;  &lt;h1&gt;&amp;#160;&lt;/h1&gt;  &lt;h2&gt;Cloud Project Setup: New Windows Azure Project Setup&lt;/h2&gt;  &lt;p&gt;Let’s start by creating a new Cloud Project.&amp;#160; For this sample I just titled my project “AzurePublishingBestPractices”&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_64B4CEEB.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_6E4D1754.png" width="413" height="287" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For the role selection you can select either a MVC Role or a Web Role.&amp;#160; For this example I selected a MVC 2 Web Role.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_26F7C162.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_789E3BB4.png" width="422" height="265" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once the project wizard is complete we are ready to setup the cloud for our deployment.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_7427BAED.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_3EAEF8C8.png" width="429" height="272" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;New Hosted Service: Windows Azure New Hosted Service Setup&lt;/h2&gt;  &lt;p&gt;Now that we have created our .Net Cloud Project, login to Windows Azure and navigate to your Hosted Services and click on the “&lt;em&gt;New Hosted Service&lt;/em&gt;” menu item.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_53344846.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_52C81551.png" width="449" height="265" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;“&lt;em&gt;Name&lt;/em&gt;” the service, set the “&lt;em&gt;URL Prefix&lt;/em&gt;”, set your “&lt;em&gt;Region&lt;/em&gt;” and then select “&lt;em&gt;Do Not Deploy&lt;/em&gt;”.&amp;#160; For this blog I named the service “ WindowsAzurePublishingBestPractices”.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Once the service is created you are ready to publish your Cloud Project to Windows Azure.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1&gt;Option 1: Publish Locally – With Manual Service Package Deployment&lt;/h1&gt;  &lt;p&gt;The first option we will explore is deploying your cloud project by publishing your project locally and then uploading the package and service configuration files manually.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 1:&amp;#160; Right Click on Your Project and Click “Publish”&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_0B72BF5F.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_2B219927.png" width="475" height="338" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step2: On the Deployment Screen select “&lt;em&gt;Create Service Package Only&lt;/em&gt;” and Click “&lt;em&gt;OK&lt;/em&gt;”&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_43B13677.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_2A49333D.png" width="373" height="339" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Once the package is created, Windows Explorer will open to the location where the files were created.&amp;#160; In that directory you should see two files: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“&lt;em&gt;[yourproject].cspkg&lt;/em&gt;” &lt;/p&gt;    &lt;p&gt;“&lt;em&gt;ServiceConfiguration.cscfg&lt;/em&gt;”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_35068A92.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_498BDA10.png" width="502" height="315" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;For the convenience of this example, copy the full path into the clipboard as we are going to need that for the Windows Azure Platform Dashboard in the next step.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 3: Go back to your Windows Azure Platform Dashboard and Click on “&lt;em&gt;New Production Deployment&lt;/em&gt;”&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_491FA71B.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_4F667DA9.png" width="505" height="311" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;On the “&lt;em&gt;Create a New Deployment Screen&lt;/em&gt;”, add a “&lt;em&gt;Deployment Name&lt;/em&gt;” and then browse to the files that you published locally.&amp;#160; Once you are finished click on “OK”.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you receive a warning indicating that you only have 1 instance configuration please adjust your instance count to 2.&amp;#160; For this example I am only going to configure 1 instance.&amp;#160; &lt;/p&gt;  &lt;p&gt;Once the instance(s) have been created, your site should be operational and deployed to the cloud.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Option 1 – Updates and Summary&lt;/h2&gt;  &lt;p&gt;In this case your initial setup may take a bit of time for Windows Azure to create the Role, create the Instance(s), etc. and at this point you may be thinking this is what is required or normal for this type of deployment.&amp;#160; For the most part you are correct.&amp;#160; However, if you take this approach with every update, Windows Azure will delete the existing instance and recreate a new instance for each deployment.&amp;#160; This surely is not ideal, and based on the fact that the initial deployment is likely to take 15 minutes to an hour+, this option is not very optimal at all.&amp;#160; In addition, given all of the manually steps we needed to follow in this case this option it is not preferred and could introduce error if you accidently select the wrong files.&amp;#160; Even worse would be if you waited an hour for a deployment only to find that you have a spelling error or a minor CSS issue.&amp;#160; You surely would not want to wait another hour for this update.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This brings up to Option 2.&amp;#160; Could this be better?????&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1&gt;Option 2: Publish Remotely – With Automated Package Deployment&lt;/h1&gt;  &lt;p&gt;Our second option we will review is Deploying to the Cloud using the Automated Deployment.&amp;#160; Well to start this one sounds better then the first one based on the fact that it is automated.&amp;#160; :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 1: Right Click on Your Project and Click “Publish”&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_19EDBB84.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_476EDB47.png" width="475" height="338" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 2: On the Deployment Screen select “&lt;em&gt;Deploy your Windows Azure Project to Windows Azure”&lt;/em&gt; and Click “&lt;em&gt;OK&lt;/em&gt;”&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_1915559A.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_51BFFFA7.png" width="312" height="293" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You will need to select your credentials, deployment target, storage account, and deployment label.&amp;#160; For more information on how to create your credentials please refer to the Windows Azure Help Topic.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/windowsazure/ff683676.aspx" href="http://msdn.microsoft.com/en-us/library/windowsazure/ff683676.aspx"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/ff683676.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In this case if you followed this tutorial and completed Option 1, then Click “OK” the delete the existing deployment when prompted.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 3: Monitoring the Automated Deployment&lt;/h2&gt;  &lt;p&gt;So far this approach seems much easier then publishing the files locally, logging into the Windows Azure Platform Dashboard and then uploading your files manually.&amp;#160; So far so good correct?????&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_66454F25.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_7102A67A.png" width="604" height="169" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Option 2 – Updates and Summary&lt;/h2&gt;  &lt;p&gt;With Option 2 the deployment is likely to still take a bit of time for Windows Azure to create the Role, create the Instance(s) etc.&amp;#160; You surely saved some time not having to manually upload files to the Windows Azure Platform Dashboard.&amp;#160; However, the issues still exist around updates.&amp;#160; If you needed to update a spelling error or CSS file you are still in the same boat with Option 2 as with Option 1.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Which brings up to Option 3. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1&gt;Option 3: Publish Remote– Remote Desktop Session&lt;/h1&gt;  &lt;p&gt;Option 3 is going to require is little bit of setup up front setup in order to provide the ability to save time later.&amp;#160;&amp;#160; I am not going to go into a lot of detail on how to setup Azure Connect as that information can be found here: &lt;a title="http://msdn.microsoft.com/en-us/library/gg433026.aspx" href="http://msdn.microsoft.com/en-us/library/gg433026.aspx"&gt;http://msdn.microsoft.com/en-us/library/gg433026.aspx&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 1: Windows Azure – Virtual Network - Install Local Endpoint &lt;/h2&gt;  &lt;p&gt;In order to allow a remote desktop session to be established you first must install a local endpoint from the Windows Azure Platform Dashboard under the “&lt;strong&gt;&lt;em&gt;Virtual Network&lt;/em&gt;&lt;/strong&gt;” Menu Item.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_6C8C25B3.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_4551DC7E.png" width="208" height="206" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click on the Install “&lt;strong&gt;&lt;em&gt;Local Endpoint&lt;/em&gt;&lt;/strong&gt;”&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 2: Install Local Endpoint – Copy the link to the Clipboard and then begin your installation&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_2BE9D944.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_7D905396.png" width="606" height="365" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 3: Download Azure Connect and Complete the Installation Wizard&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_6428505C.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_03D72A25.png" width="493" height="126" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are many options available for setting up and configuring Windows Azure Connect.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg433045.aspx"&gt;Checklist for Configuring Connections for Windows Azure Roles&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg433029.aspx"&gt;Checklist for Joining a Windows Azure Role to Your Domain&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg433071.aspx"&gt;How to Activate Windows Azure Roles for Windows Azure Connect&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg432964.aspx"&gt;How to Install Local Endpoints with Windows Azure Connect&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/gg433031.aspx"&gt;How to Create and Configure a Group of Endpoints in Windows Azure Connect&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh134848.aspx"&gt;How to Configure Relay Regions in Windows Azure Connect&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh134846.aspx"&gt;How to Configure Certificate-based Activation in Windows Azure Connect&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For this blog I am going to try to keep this very simple and straight forward.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 4: Get an Activation Token&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_7C4BBAB7.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_1BFA9480.png" width="425" height="274" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Click on the Get Activation Token Button and Copy the Activation Token to your clipboard.&lt;/p&gt;  &lt;p&gt;Good news we are almost done. :)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 5: Activate your Local Endpoint with the Activation Token&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_6996C100.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_74541855.png" width="516" height="256" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;To get to the Windows Azure Connect Activation Area, right click on your Web Role and click on “&lt;strong&gt;&lt;em&gt;Properties&lt;/em&gt;&lt;/strong&gt;”.&amp;#160; &lt;/li&gt;    &lt;li&gt;Then click on the Virtual Network Tab.&amp;#160; &lt;/li&gt;    &lt;li&gt;As shown in the screenshot above, click on the Activate Windows Azure Connect. &lt;/li&gt;    &lt;li&gt;Now paste your activation token into the text box. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 6: Configure Remote Desktop Roles and Connections&lt;/h2&gt;  &lt;p&gt;To configure you Remote Desktop Roles and Connection.&amp;#160; Right Click on the Cloud Project and Select Publish.&amp;#160; From the Publish Screen Click on “&lt;strong&gt;&lt;em&gt;Configure Remote Desktop Connections&lt;/em&gt;&lt;/strong&gt;”&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_2CFEC263.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_2C928F6E.png" width="421" height="421" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A best practice would be to lock these connections down by role, but for the simplicity of this blog we are going to allow connections for all roles.&amp;#160; Please refer to the links above on setup for Remote Connections and some of the advanced options available.&amp;#160; You can always disable the remote connection by unchecking the Remote Access “Enabled” checkbox from the Windows Azure Dashboard.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 7:&amp;#160; Create the Remote Desktop Connection Certificate and Set Login Credentials&lt;/h2&gt;  &lt;p&gt;The next step is to create a new certificate that will be used to ensure that you are the only person able to connect to the server.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_132A8C34.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_79C288F9.png" width="244" height="228" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;After you create the certificate, select the certificate in the list and then provide a user name and password to login to the Cloud instance.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_197162C2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_521C0CCF.png" width="241" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then click on “OK”&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you attempt to deploy your project now you will receive an error as shown below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_1FB83950.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_5862E35D.png" width="606" height="134" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This error is caused by not having the certificate in the Windows Azure Service.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 8: Upload your Certificate to your Hosted Service Instance&lt;/h2&gt;  &lt;p&gt;Navigate back into the Windows Azure Platform Dashboard and select your service.&amp;#160; Once you have selected your service click in the Certificates Folder.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_2A095DB0.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_2592DCE9.png" width="621" height="174" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Then Click on “Add Certificate” and browse to the appropriate exported certificate file.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_4541B6B1.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_37033DC1.png" width="517" height="239" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enter your password and click on “OK”.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;The end result will look as follows:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_1D9B3A87.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_0433374D.png" width="725" height="238" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Now you are ready to publish your application to the cloud.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_03C70458.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_2375DE20.png" width="729" height="167" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;If you are not sure where the certificate is located or have not exported the certificate. Please click on the “View ” and then Export your certificate.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_5C20882D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_42B884F3.png" width="400" height="408" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Step 9: Connect to your instance using Remote Desktop&lt;/h2&gt;  &lt;p&gt;To connect to your instance, navigate back into the Windows Azure Platform Dashboard and select your service.&amp;#160; From your service expand the instance and click on the particular instance for which you would like to connect.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_7B632F00.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_61FB2BC6.png" width="680" height="157" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Then click on the connect Menu Icon.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_1AA5D5D4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_2158DF57.png" width="244" height="214" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_2C1636AC.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_12AE3372.png" width="244" height="144" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When prompted enter in the credentials you setup in the previous steps.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_604A5FF2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_18F50A00.png" width="244" height="188" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Once connected you now have access to the cloud instance as if it were located in your own data center.&amp;#160; Now that you are connected remotely you can restart IIS, recycle the application pool, make file updates, copy and paste files from explorer to your remote desktop connection and many other options.&amp;#160; Surely you could use cloud storage for your images, and css files as another option as well to save time on your deployment, but this blog was to demonstrate the deployment options and leveraging remote connections to the cloud.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h2&gt;Option 3 – Updates and Summary&lt;/h2&gt;  &lt;p&gt;With Option 3 there obviously some overhead with setting up the remote connection, but hopefully by logging directly into the cloud instance via Remote Desktop you can truly see this value.&amp;#160; Especially if you need to perform a quick CSS update, replace an image or update a file.&amp;#160; You surely would not want to wait 15m or 2 hours to make this update by tearing down your cloud instances and redeploying.&amp;#160;&amp;#160; &lt;/p&gt;  &lt;p&gt;There are some downsides to this approach, one being if you have a lot of instances you will have a lot of updates to make.&amp;#160; Another downside is knowledge of IIS and Web Server Setup.&amp;#160; With the other deployment options you do not need to understand IIS much at all other then deploying the package.&amp;#160; &lt;/p&gt;  &lt;p&gt;The key benefit with this Option is to save you time in a pinch where you do not need to reestablish all of the instances and only need to make minor updates. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_467629C3.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_7F20D3D0.png" width="470" height="361" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_09DE2B26.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_654C9DA1.png" width="477" height="386" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h1&gt;Quick Deployment Options Benefit List&lt;/h1&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="2" width="734"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;&lt;strong&gt;Option 1 – Manual&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="162"&gt;&lt;strong&gt;Option 2 – Publish Remote &lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="219"&gt;&lt;strong&gt;Option 3 – Publish Remote with Remote Desktop Session&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Initial Setup for Deployment&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;average&lt;/td&gt;        &lt;td valign="top" width="162"&gt;easy&lt;/td&gt;        &lt;td valign="top" width="219"&gt;involved&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Create New Instances&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;X&lt;/td&gt;        &lt;td valign="top" width="162"&gt;X&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Update Instances&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;X&lt;/td&gt;        &lt;td valign="top" width="162"&gt;X&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;IIS Administration&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="162"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Support IIS Recycle&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="162"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Supports Copy/Paste&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="162"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Support File Explorer&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="162"&gt;&amp;#160;&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;File Updates&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;(requires instance updates)&lt;/td&gt;        &lt;td valign="top" width="162"&gt;(requires instance updates)&lt;/td&gt;        &lt;td valign="top" width="219"&gt;X – very easy&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Projected Update Time&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;15m – 2 hours&lt;/td&gt;        &lt;td valign="top" width="162"&gt;15m – 2 hours&lt;/td&gt;        &lt;td valign="top" width="219"&gt;as fast as it take to copy files&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Ease of Updates&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;Very time consuming&lt;/td&gt;        &lt;td valign="top" width="162"&gt;Very time consuming&lt;/td&gt;        &lt;td valign="top" width="219"&gt;easy and convenient &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Knowledge of IIS Needed (app pools, etc)&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;No&lt;/td&gt;        &lt;td valign="top" width="162"&gt;No&lt;/td&gt;        &lt;td valign="top" width="219"&gt;Yes (true remote desktop session)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Server Knowledge Needed&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;No&lt;/td&gt;        &lt;td valign="top" width="162"&gt;No&lt;/td&gt;        &lt;td valign="top" width="219"&gt;Yes (true remote desktop session)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Restart Instance&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;partially - (in dashboard only)&lt;/td&gt;        &lt;td valign="top" width="162"&gt;partially - (in dashboard only)&lt;/td&gt;        &lt;td valign="top" width="219"&gt;Yes&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Experience Level&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;Novice to Expert&lt;/td&gt;        &lt;td valign="top" width="162"&gt;Novice to Expert&lt;/td&gt;        &lt;td valign="top" width="219"&gt;Intermediate to Export&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="173"&gt;&lt;strong&gt;Risk Level&lt;/strong&gt;&lt;/td&gt;        &lt;td valign="top" width="178"&gt;Medium&lt;/td&gt;        &lt;td valign="top" width="162"&gt;Low&lt;/td&gt;        &lt;td valign="top" width="219"&gt;High&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I hope that you find this post helpful and enjoy.&amp;#160; &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Comments and/or questions are always welcome.&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7958014" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/.NET+FAQ/default.aspx">.NET FAQ</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Windows+Azure+Management+API/default.aspx">Windows Azure Management API</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/FAQ/default.aspx">FAQ</category></item><item><title>WP7 Tips–Part I– Media File Coding Techniques to help pass the Windows Phone 7 Marketplace Certification Requirements</title><link>http://weblogs.asp.net/seaniannuzzi/archive/2011/01/05/how-to-write-code-that-will-pass-the-windows-phone-7-marketplace-requirements-when-playing-media-files.aspx</link><pubDate>Wed, 05 Jan 2011 19:51:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7675097</guid><dc:creator>seaniannuzzi</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/seaniannuzzi/rsscomments.aspx?PostID=7675097</wfw:commentRss><comments>http://weblogs.asp.net/seaniannuzzi/archive/2011/01/05/how-to-write-code-that-will-pass-the-windows-phone-7-marketplace-requirements-when-playing-media-files.aspx#comments</comments><description>&lt;h1&gt;Overview&lt;/h1&gt;  &lt;p&gt;Developing an application that plays media files on a Windows Phone 7 Device seems fairly straight forward.&amp;nbsp; However, what can make this a bit frustrating are the necessary requirements in order to pass the WP7 marketplace requirements so that your application can be published.&amp;nbsp; If you are new to this development, be aware of these common challenges that are likely to be made.&amp;nbsp; Below are some techniques and recommendations on how optimize your application to handle playing MP3 and/or WMA files that needs to adhere to the marketplace requirements.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=183220" mce_href="http://go.microsoft.com/fwlink/?LinkID=183220" target="_blank"&gt;Windows Phone 7 Certification Requirements&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/10/29/updated-version-of-windows-phone-7-application-certification-requirements.aspx" mce_href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/10/29/updated-version-of-windows-phone-7-application-certification-requirements.aspx" target="_blank"&gt;Windows Phone 7 Developers Blog&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;Some common challenges are:&lt;/p&gt;  &lt;blockquote&gt;   &lt;ul&gt;     &lt;li&gt;Not prompting the user if another media file is playing in the background before playing your media file &lt;/li&gt;      &lt;li&gt;Not allowing the user to control the volume &lt;/li&gt;      &lt;li&gt;Not allowing the user to mute the sound &lt;/li&gt;      &lt;li&gt;Not allowing the media to be interrupted by a phone call&amp;nbsp; &lt;/li&gt;   &lt;/ul&gt; &lt;/blockquote&gt;  &lt;p&gt;To keep this as simple as possible I am only going to focus on what “not to do” and what “to do” in order to implement a simple media solution.&lt;/p&gt;  &lt;h3&gt;&lt;b&gt;&lt;i&gt;Things you will need or may be useful to you before you begin:&lt;/i&gt;&lt;/b&gt;&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/visualstudio/en-us/download" mce_href="http://www.microsoft.com/visualstudio/en-us/download" target="_blank"&gt;Visual Studio 2010&lt;/a&gt;&lt;/p&gt;  &lt;h3&gt;&lt;font style="font-weight: normal;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/vstudio/ff655021" mce_href="http://msdn.microsoft.com/en-us/vstudio/ff655021" target="_blank"&gt;Visual Studio 2010 Feature Packs&lt;/a&gt;&lt;/font&gt;&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce" mce_href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce" target="_blank"&gt;Windows Phone 7 Developer Tools&lt;/a&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Visual Studio 2010 Express for Windows Phone &lt;/li&gt;    &lt;li&gt;Windows Phone Emulator Resources &lt;/li&gt;    &lt;li&gt;Silverlight 4 Tools For Visual Studio &lt;/li&gt;    &lt;li&gt;XNA Game Studio 4.0 &lt;/li&gt;    &lt;li&gt;Microsoft Expression Blend for Windows Phone &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Please keep in mind you do not need all of these downloaded and installed, it is just easier to have all that you need now rather than add them on later.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h1&gt;Objective Summary&lt;/h1&gt;  &lt;p&gt;Create a Windows Phone 7 – Windows Media Sample Application.&amp;nbsp; The application will implement many of the required features in order to pass the WP7 marketplace certification requirements in order to publish an application to WP7’s marketplace.&lt;/p&gt;  &lt;p&gt;(Disclaimer: I am not trying to indicate that this application will always pass as the requirements may change or be updated)&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Step 1: – Create a New Windows Phone 7 Project&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_4AE83AED.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_4AE83AED.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_57E21AFE.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_57E21AFE.png" width="537" border="0" height="373"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Step 2: – Update the Title and Application Name of your WP7 Application&lt;/h2&gt;  &lt;p&gt;For this example I changed:&lt;/p&gt;  &lt;p&gt;the Title to: “&lt;i&gt;&lt;u&gt;DOTNETNUZZI &lt;i&gt;&lt;u&gt;WP7 &lt;/u&gt;&lt;/i&gt;MEDIA SAMPLE - v1.00&lt;/u&gt;&lt;/i&gt;” &lt;/p&gt;  &lt;p&gt;and the Page Title to:&amp;nbsp; “&lt;u&gt;&lt;i&gt;media magic&lt;/i&gt;&lt;/u&gt;”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_62333F5E.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_62333F5E.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_5A3B9CFC.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_5A3B9CFC.png" width="233" border="0" height="421"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Note: &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;I also updated the background.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Step 3: – XAML - Media Element Preparation and Best Practice&lt;/h2&gt;  &lt;p&gt;Before we begin the next step I just wanted to point out a few things that you should not do as a best practice when developing an application for WP7 that is playing music.&amp;nbsp; Please keep in mind that these requirements are not the same if you are playing Sound Effects and are geared towards playing media in the background.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h4&gt;&lt;font size="2"&gt;If you have coded this – be prepared to change it:&lt;/font&gt;&lt;/h4&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_406766CD.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_406766CD.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_38DBF760.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_38DBF760.png" width="462" border="0" height="357"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;To avoid a failure from the market place remove all of your media source elements from your XAML or simply create them dynamically.&amp;nbsp; To keep this simple we will remove the source and set the AutoPlay property to false to ensure that there are no media elements are active when the application is started.&lt;/p&gt;  &lt;h4&gt;&lt;font size="2"&gt;Proper example of the media element with No Source:&lt;/font&gt;&lt;/h4&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_1F07C131.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_1F07C131.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_57B26B3E.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_57B26B3E.png" width="465" border="0" height="106"&gt;&lt;/a&gt;&amp;nbsp; &lt;/p&gt;  &lt;h4&gt;&lt;font size="2"&gt;Some Additional Settings - Add XAML Support for a Mute Button&lt;/font&gt;&lt;/h4&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_1E2F5B47.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_1E2F5B47.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_566DD25F.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_566DD25F.png" width="607" border="0" height="145"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Step 4: – Boolean to handle toggle of Mute Feature&lt;/h2&gt;  &lt;h3&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_0AA1FBA6.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_0AA1FBA6.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_5C4875F8.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_5C4875F8.png" width="419" border="0" height="49"&gt;&lt;/a&gt;&lt;/h3&gt;  &lt;h3&gt;   &lt;br&gt;&lt;/h3&gt;  &lt;h2&gt;Step 5: – Add Event Handler for Main Page Load&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_3097ABFC.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_3097ABFC.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_1B39F694.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_1B39F694.png" width="430" border="0" height="107"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Step 6: – Add Reference to the XNA Framework&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_01D1F35A.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_01D1F35A.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_335D60EF.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_335D60EF.png" width="391" border="0" height="333"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Step 7: – Add two Using Statements to Resolve the Namespace of Media and the Application Bar&lt;/h2&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;/b&gt; Microsoft.Xna.Framework.Media;     &lt;br&gt;&lt;b&gt;&lt;font color="#0000ff"&gt;using&lt;/font&gt;&lt;/b&gt; Microsoft.Phone.Shell;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_2E7AAD33.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_2E7AAD33.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_54DC907E.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_54DC907E.png" width="578" border="0" height="150"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Step 8: – Add the Method to Check the Media State as Shown Below&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_4D4DA199.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_4D4DA199.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_2F8C16DA.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_2F8C16DA.png" width="731" border="0" height="489"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Step 9: – Add Code to Mute the Media File&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_4D8A24CE.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_4D8A24CE.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_361ED4C3.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_361ED4C3.png" width="736" border="0" height="406"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h2&gt;Step 10: – Add Code to Play the Media File&lt;/h2&gt;  &lt;p&gt;&lt;font color="#008000"&gt;//if the state of the media has been checked you are good to go.      &lt;br&gt;&lt;/font&gt;media_sample.Play(); &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;     &lt;br&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;If we tried to perform this operation at this point you will receive the following error:&lt;/p&gt;    &lt;p&gt;System.InvalidOperationException was unhandled Message=FrameworkDispatcher.Update has not been called. Regular FrameworkDispatcher.Update calls are necessary for fire and forget sound effects and framework events to function correctly. &lt;/p&gt;    &lt;p&gt;See &lt;a href="http://go.microsoft.com/fwlink/?LinkId=193853" mce_href="http://go.microsoft.com/fwlink/?LinkId=193853"&gt;http://go.microsoft.com/fwlink/?LinkId=193853&lt;/a&gt; for details.       &lt;br&gt;&lt;/p&gt;    &lt;p&gt;&lt;b&gt;StackTrace:&lt;/b&gt;       &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.FrameworkDispatcher.AddNewPendingCall(ManagedCallType callType, UInt32 arg)       &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at Microsoft.Xna.Framework.UserAsyncDispatcher.HandleManagedCallback(ManagedCallType managedCallType, UInt32 managedCallArgs) at Microsoft.Xna.Framework.UserAsyncDispatcher.AsyncDispatcherThreadFunction()       &lt;br&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_433C7FE6.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_433C7FE6.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_49835674.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_49835674.png" width="436" border="0" height="301"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;It is not recommended that you just add the &lt;b&gt;FrameworkDispatcher.Update();&lt;/b&gt; call before playing the media file.&lt;/p&gt;  &lt;p&gt;It is recommended that you implement the following class to your solution and implement this class in the &lt;b&gt;app.xaml.cs&lt;/b&gt; file.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h2&gt;Step 11: – Add FrameworkDispatcher Features&lt;/h2&gt;  &lt;p&gt;I recommend creating a class named &lt;b&gt;XNAAsyncDispatcher&lt;/b&gt; and adding the following code:&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_28FC16C2.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_28FC16C2.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_7AA29114.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_7AA29114.png" width="484" border="0" height="328"&gt;&lt;/a&gt;     &lt;br&gt;&lt;/p&gt;  &lt;p&gt;After you have added the code accordingly, you can now implement this into your &lt;b&gt;app.xaml.cs&lt;/b&gt; file as highlighted below.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_613A8DDA.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_613A8DDA.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_47D28AA0.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_47D28AA0.png" width="485" border="0" height="343"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Note:&lt;/b&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;If you application sound file is not playing make sure you have the proper “Build Action” set such as Content.&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h1&gt;Running the Sample&lt;/h1&gt;  &lt;p&gt;Now that we have some of the foundation created you should be able to run the application successfully.&amp;nbsp; When the application launches your sound options should be set accordingly when the “&lt;b&gt;checkMediaState&lt;/b&gt;” method is called.&amp;nbsp; As a result the application will properly setup the media options and/or alert the user accordinglyper the certification requirements.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;In addition, the sample also shows a quick way to mute the sound in your application by simply removing the URI source of the media file.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;If everything successfully compiled the application should look similar to below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/image_606227F0.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/image_606227F0.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_71D288C8.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/image_thumb_71D288C8.png" width="186" border="0" height="345"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sound playing&amp;gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;h1&gt;Summary&lt;/h1&gt;  &lt;p&gt;At this point we have a fully functional application that provides techniques on how to avoid some common challenges when working with media files and developing applications for Windows Phone 7.&amp;nbsp; The techniques mentioned above should make things a little easier and helpful in getting your WP7 application approved and published on the Marketplace.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;The next blog post will be titled:&lt;/p&gt;  &lt;p&gt;&lt;b&gt;WP7 Tips–Part II - How to write code that will pass the Windows Phone 7 Marketplace Requirements for Themes (light and dark).&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;If anyone has any questions or comments please comment on this blog.&amp;nbsp; &lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7675097" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/.NET+FAQ/default.aspx">.NET FAQ</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/VB.NET/default.aspx">VB.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/WP7/default.aspx">WP7</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Windows+Phone+7/default.aspx">Windows Phone 7</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Mobile/default.aspx">Mobile</category></item><item><title>Publishing to Windows Azure using Windows Azure Service Management API.</title><link>http://weblogs.asp.net/seaniannuzzi/archive/2010/11/17/publishing-to-windows-azure-using-windows-azure-service-management-api.aspx</link><pubDate>Thu, 18 Nov 2010 04:47:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7646187</guid><dc:creator>seaniannuzzi</dc:creator><slash:comments>5</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/seaniannuzzi/rsscomments.aspx?PostID=7646187</wfw:commentRss><comments>http://weblogs.asp.net/seaniannuzzi/archive/2010/11/17/publishing-to-windows-azure-using-windows-azure-service-management-api.aspx#comments</comments><description>&lt;p&gt;In many cases publishing to the Windows Azure is fairly straight forward and has become even more so with the completely integrated Windows Azure Service Management API.&amp;nbsp; Prior to the API being enabled you had to create a package and deploy the package manually to the Cloud by selecting your Package and Configuration file.&amp;nbsp; This is no longer the case with the Windows Azure Services Management API.&lt;/p&gt;  &lt;p&gt;In addition, the Windows Services API seems to be a bit more integrated into Windows Azure.&amp;nbsp; This could just be my perception of the services, but it seems that when I “cancel” or want to stop an already existing publish that it work faster using the API.&amp;nbsp; I have also seen cases were the Cloud Services dashboard appears to be a bit behind with the status of the deployment.&lt;/p&gt;  &lt;p&gt;In this post I will provide the information you will need in order to setup the Windows Azure Service Management API as this service requires the registration of a client side certificate and subscription ID.&amp;nbsp; Below you will find screenshots of each step and the final result of a publish using the Management API.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Note:&lt;/b&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;When publishing with the Management API it also provides an automatic label so that you can easily track your deployments.     &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Before you being the following steps below, please either open your Windows Azure project or Create a New One and then follow the steps below.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.00 – Publish to Azure using the Management API – Publish&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Right click on your Cloud Project and Click Publish&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.00_1287C5EB.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.00_1287C5EB.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.00_thumb_7B88A8D4.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.00" alt="CloudPublish1.00" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.00_thumb_7B88A8D4.png" width="414" border="0" height="394"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.01 – Publish to Azure using the Management API – Add New Hosted Service Credential&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;In the publish Cloud Service Dialog click on the Credentials Dropdown and Click &lt;b&gt;“Add”&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.01_4EAF7D94.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.01_4EAF7D94.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.01_thumb_4382A0F2.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.01" alt="CloudPublish1.01" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.01_thumb_4382A0F2.png" width="368" border="0" height="307"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.02 – Publish to Azure using the Management API – Add New Hosted Service Credential&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;An authentication dialog will be shown prompting you “Select” or “Create” a certificate that will be used for authentication of the Management API.&amp;nbsp; I suggest you create a &lt;b&gt;“New” &lt;/b&gt;certificate. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.02_39E996E2.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.02_39E996E2.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.02_thumb_64FDBC82.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.02" alt="CloudPublish1.02" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.02_thumb_64FDBC82.png" width="365" border="0" height="270"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.03 – Publish to Azure using the Management API – Create New Authentication Certificate&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;In the Authentication certificate dropdown click on &lt;b&gt;“Create”&lt;/b&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.03_2694A677.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.03_2694A677.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.03_thumb_75359649.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.03" alt="CloudPublish1.03" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.03_thumb_75359649.png" width="370" border="0" height="248"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.04 – Publish to Azure using the Management API – Enter a Friendly Name for your Authentication Certificate&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Enter a Friendly Name for your Authentication Certificate&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.04_4A898F9F.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.04_4A898F9F.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.04_thumb_40D0FB9C.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.04" alt="CloudPublish1.04" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.04_thumb_40D0FB9C.png" width="381" border="0" height="260"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.05 – Publish to Azure using the Management API – Certificate Created.&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Now that you have created the certificate the next step will be to upload the certificate to the Cloud and associate it with your Subscription.&amp;nbsp; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.05_14E05C13.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.05_14E05C13.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.05_thumb_4EAF5365.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.05" alt="CloudPublish1.05" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.05_thumb_4EAF5365.png" width="388" border="0" height="265"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.06 – Publish to Azure using the Management API – Copy Certificate Path&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;To save time click on the Copy Certificate Path link as shown below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.06_70C71351.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.06_70C71351.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.06_thumb_6C7CEFF2.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.06" alt="CloudPublish1.06" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.06_thumb_6C7CEFF2.png" width="393" border="0" height="325"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;NOTE: &lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;i&gt;For these next steps you will need to login to your Windows Azure Account.&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.07 – Publish to Azure using the Management API – Managing My API Certificates&lt;/b&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Login to Windows Azure      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Click on your Azure Services      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Click on the Account Tab      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Click on the &lt;b&gt;“Manage My API Certificates”&lt;/b&gt; Link &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.07_4ACD4EFC.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.07_4ACD4EFC.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.07_thumb_08C61E14.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.07" alt="CloudPublish1.07" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.07_thumb_08C61E14.png" width="502" border="0" height="303"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.08 – Publish to Azure using the Management API – Paste the Copied Certificate Path&lt;/b&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Click in the Textbox Area or Click on the Browse button      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Paste in the path to the certificate your generated earlier. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.08_1F2896CE.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.08_1F2896CE.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.08_thumb_5AA859F4.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.08" alt="CloudPublish1.08" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.08_thumb_5AA859F4.png" width="505" border="0" height="127"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.09 – Publish to Azure using the Management API – Certificate Verification&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Once you have uploaded your certificate you are just about finished.&amp;nbsp; Verify that your certificate was installed as shown below.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.09_1FA0DB91.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.09_1FA0DB91.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.09_thumb_35972156.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.09" alt="CloudPublish1.09" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.09_thumb_35972156.png" width="508" border="0" height="197"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.10 – Publish to Azure using the Management API – Certificate Verification&lt;/b&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Next click back on the Account Tab      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Then locate and select your Subscription ID      &lt;br&gt;&lt;/li&gt;    &lt;li&gt;Once you have selected your Subscription ID navigate back to your Visual Studio 2010 Windows Azure Project where the dialog is still shown and paste in the Subscription ID as shown below.&amp;nbsp; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.10_2B25B15C.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.10_2B25B15C.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.10_thumb_4AF0C2BF.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.10" alt="CloudPublish1.10" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.10_thumb_4AF0C2BF.png" width="582" border="0" height="315"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.11 – Publish to Azure using the Management API – Management API Services Enabled&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Once you have completed the steps above the Management API Deployment Services should be connected to your Windows Azure Cloud Services and show you a list of available deployment options.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.11_0A9A5DAB.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.11_0A9A5DAB.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.11_thumb_3335775A.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.11" alt="CloudPublish1.11" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.11_thumb_3335775A.png" width="410" border="0" height="347"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Note: When using the API by default the Deployment Wizard will add a Label so that you are able to track your deployments.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.12 – Publish to Azure using the Management API – Deployment – Cancel&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;At this point you should be all set to use the Management API to publish your Cloud Application.&amp;nbsp; One of the nice features with using the Management API is the ability to Cancel/Stop or a deployment process.&amp;nbsp; While you can do this using the Azure Dashboard, I have found that using the API seems to be a bit more integrated or simply just work faster.&amp;nbsp; Judge for yourself, but this is a very nice feature that is completely seamless.&lt;/p&gt;  &lt;p&gt;&amp;nbsp; &lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.12_4636586C.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.12_4636586C.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.12_thumb_5C98D126.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.12" alt="CloudPublish1.12" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.12_thumb_5C98D126.png" width="607" border="0" height="220"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Figure 1.13 – Publish to Azure using the Management API – Deployment Successful&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;At this point everything should be setup and enabled so that you can deployment you Cloud Application using the Windows Azure Management API.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.13_2E8B32D4.png" mce_href="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.13_2E8B32D4.png"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.13_thumb_44817899.png" style="background-image: none; border-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="CloudPublish1.13" alt="CloudPublish1.13" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/CloudPublish1.13_thumb_44817899.png" width="627" border="0" height="196"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;nbsp;&lt;/p&gt;  &lt;p&gt;Enjoy…..&lt;/p&gt;&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7646187" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/.NET+FAQ/default.aspx">.NET FAQ</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Windows+Azure+Management+API/default.aspx">Windows Azure Management API</category></item><item><title>How to Create a Windows Azure Storage Account and Custom Domain Name (register a CName record) in 3 Easy Steps</title><link>http://weblogs.asp.net/seaniannuzzi/archive/2010/11/14/how-to-create-a-windows-azure-storage-account-and-custom-domain-name-register-a-cname-record-in-3-easy-steps.aspx</link><pubDate>Sun, 14 Nov 2010 15:11:00 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:7642886</guid><dc:creator>seaniannuzzi</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://weblogs.asp.net/seaniannuzzi/rsscomments.aspx?PostID=7642886</wfw:commentRss><comments>http://weblogs.asp.net/seaniannuzzi/archive/2010/11/14/how-to-create-a-windows-azure-storage-account-and-custom-domain-name-register-a-cname-record-in-3-easy-steps.aspx#comments</comments><description>&lt;p class="MsoNormal"&gt;Depending on the type of application you are building it may
be necessary for you to register a CName record with your Storage Account that
you created.&lt;span style=""&gt;&amp;nbsp; &lt;/span&gt;There are many reasons that
you may want to perform this registration such as if you are building a
Silverlight/Flash Application that requires that all of your resources are
within the same domain.&lt;span style=""&gt;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;



&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt; line-height: 115%;"&gt;Step
1:&lt;span style=""&gt;&amp;nbsp; &lt;/span&gt;Create the Azure Storage Account&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpFirst" style="margin-left: 50.25pt; text-indent: -0.25in;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;a)&lt;span style="font: 7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Login to your Windows Azure Account&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpMiddle" style="margin-left: 50.25pt; text-indent: -0.25in;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;b)&lt;span style="font: 7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Select your Azure Services&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpMiddle" style="margin-left: 50.25pt; text-indent: -0.25in;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;c)&lt;span style="font: 7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Click on Create New Service&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpLast" style="margin-left: 50.25pt; text-indent: -0.25in;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;d)&lt;span style="font: 7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Select Storage Account&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpLast" style="margin-left: 50.25pt; text-indent: -0.25in;"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Figure 1.0 - Create Storage Account&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService.png" title="Figure 1.0 - Create Storage Account " alt="Figure 1.0 - Create Storage Account " mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService.png" width="734" height="415"&gt;&lt;br style="page-break-before: always;" clear="all"&gt;
&lt;/p&gt;
&lt;br&gt;

&lt;p class="MsoNormal"&gt;Figure 1.1 - Create Storage Account - Create the Service&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt; line-height: 115%;"&gt;&lt;img src="file:///C:/Users/SEANIA%7E1/AppData/Local/Temp/msohtmlclip1/01/clip_image004.jpg" width="624" height="352"&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt; line-height: 115%;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt; line-height: 115%;"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService1.1.png" title="Figure 1.1 - Create Storage Account - Create the Service" alt="Figure 1.1 - Create Storage Account - Create the Service" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService1.1.png" width="768" height="434"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;&amp;nbsp; Figure 1.2 - Create Storage Account - Name the Blob Storage
Account&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt; line-height: 115%;"&gt;&lt;img src="file:///C:/Users/SEANIA%7E1/AppData/Local/Temp/msohtmlclip1/01/clip_image006.jpg" width="516" height="560"&gt;&lt;/span&gt;&lt;/b&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt; line-height: 115%;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
&lt;b style=""&gt;&lt;span style="font-size: 14pt; line-height: 115%; font-family: 'Calibri','sans-serif';"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService1.2.png" title="Figure 1.2 - Create Storage Account - Name the Blob Storage Account" alt="Figure 1.2 - Create Storage Account - Name the Blob Storage Account" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService1.2.png" width="516" height="560"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&amp;nbsp;Figure 1.3 - Create Storage Account - Storage Account
Summary&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService1.3.png" title="Figure 1.3 - Create Storage Account - Storage Account Summary" alt="Figure 1.3 - Create Storage Account - Storage Account Summary" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService1.3.png" width="629" height="506"&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt; line-height: 115%;"&gt;Step 2:&lt;span style=""&gt;&amp;nbsp; &lt;/span&gt;Create the Custom Domain Name and Register the
CName Record&lt;/span&gt;&lt;/b&gt; &lt;br&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Note:&lt;br&gt;
&lt;/b&gt;For this step to work you must have access to register CName records with
your domain.&lt;span style=""&gt;&amp;nbsp; &lt;/span&gt;Usually this can be done by
simply logging in to your provider and updating the list.&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpFirst" style="margin-left: 50.25pt; text-indent: -0.25in;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;a)&lt;span style="font: 7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Click on the Manage Link to the Right of the
Custom Domain &lt;/p&gt;

&lt;p class="MsoListParagraphCxSpMiddle" style="margin-left: 50.25pt; text-indent: -0.25in;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;b)&lt;span style="font: 7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Enter your domain name and Click Generate Key&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpMiddle" style="margin-left: 50.25pt; text-indent: -0.25in;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;c)&lt;span style="font: 7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Click on the Manage Link Next to your Custom
Domain and Click Validate&lt;/p&gt;

&lt;p class="MsoListParagraphCxSpLast" style="margin-left: 50.25pt; text-indent: -0.25in;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;d)&lt;span style="font: 7pt 'Times New Roman';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;Follow the instructions on the page on what to
enter in for the CName Records&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Note:&lt;/b&gt;&lt;br&gt;
If you receive a Dr. Watson Error then your CName Record mapping entered into
your Domain Provider is likely to be incorrect or not working.&lt;/p&gt; &lt;br&gt;&lt;p class="MsoNormal"&gt;Figure 2.0 - Create the Custom Domain&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;img src="file:///C:/Users/SEANIA%7E1/AppData/Local/Temp/msohtmlclip1/01/clip_image010.jpg" width="624" height="159"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService2.0.png" title="Figure 2.0 - Create the Custom Domain" alt="Figure 2.0 - Create the Custom Domain" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService2.0.png" width="777" height="198"&gt; &lt;/p&gt;

&lt;p class="MsoNormal"&gt;Figure 2.1 - Create the Custom Domain - Domain Association&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;img src="file:///C:/Users/SEANIA%7E1/AppData/Local/Temp/msohtmlclip1/01/clip_image012.jpg" width="624" height="403"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService2.1.png" title="Figure 2.1 - Create the Custom Domain - Domain Association" alt="Figure 2.1 - Create the Custom Domain - Domain Association" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService2.1.png" width="768" height="496"&gt;&lt;br&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Figure 2.2 - Create the Custom Domain - Mapping&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;img src="file:///C:/Users/SEANIA%7E1/AppData/Local/Temp/msohtmlclip1/01/clip_image014.jpg" width="624" height="95"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService2.2.png" title="Figure 2.2 - Create the Custom Domain - Mapping" alt="Figure 2.2 - Create the Custom Domain - Mapping" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService2.2.png" width="765" height="116"&gt;&lt;br&gt;&lt;/p&gt;


&lt;p class="MsoNormal"&gt;Figure 2.3 - Create the Custom Domain - Validate the Domain
Association&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService2.3.png" title="Figure 2.3 - Create the Custom Domain - Validate the Domain Association" alt="Figure 2.3 - Create the Custom Domain - Validate the Domain Association" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService2.3.png" width="765" height="532"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;img src="file:///C:/Users/SEANIA%7E1/AppData/Local/Temp/msohtmlclip1/01/clip_image016.jpg" width="624" height="434"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Note:&lt;/b&gt;&lt;br&gt;
If you receive a Dr. Watson Error then your CName Record mapping entered into
your Domain Provider is likely to be incorrect or not working.&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Figure 2.3.1 - Create the Custom Domain - Validate the
Domain Association&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService2.3.1.png" title="Figure 2.3.1 - Create the Custom Domain - Validate the Domain Association" alt="Figure 2.3.1 - Create the Custom Domain - Validate the Domain Association" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService2.3.1.png" width="761" height="98"&gt;&lt;br&gt;&lt;/p&gt;



&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt; line-height: 115%;"&gt;Step 3:&lt;span style=""&gt;&amp;nbsp; &lt;/span&gt;Verify Your Domain CName Record and Domain
Name Association&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="font-size: 14pt; line-height: 115%;"&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;At this point all that is left to
do is to validate that your blob storage is properly associated to your CName
records.&lt;span style=""&gt;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;br&gt;&lt;p class="MsoNormal"&gt;Figure 3.0 - Validate Domain CName Record and Domain Name
Association&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;img src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService3.0.png" title="Figure 3.0 - Validate Domain CName Record and Domain Name Association" alt="Figure 3.0 - Validate Domain CName Record and Domain Name Association" mce_src="http://weblogs.asp.net/blogs/seaniannuzzi/Azure/NewStorageService3.0.png" width="777" height="198"&gt;&amp;nbsp;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;img src="file:///C:/Users/SEANIA%7E1/AppData/Local/Temp/msohtmlclip1/01/clip_image020.jpg" width="624" height="159"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p class="MsoNormal"&gt;Hopefully this blog entry was helpful and useful to some as
using this technique can come in handy when developing applications that
integrate with Flash and Silverlight and need to access resources and/or assets
that are not in the same domain.&lt;span style=""&gt;&amp;nbsp; &lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=7642886" width="1" height="1"&gt;</description><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/.NET+FAQ/default.aspx">.NET FAQ</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/C_2300_/default.aspx">C#</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/.NET/default.aspx">.NET</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/CName/default.aspx">CName</category><category domain="http://weblogs.asp.net/seaniannuzzi/archive/tags/Flash/default.aspx">Flash</category></item></channel></rss>