<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Midwest Developer Insights &#187; Azure</title>
	<atom:link href="http://blog.yeahstu.com/tag/azure/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.yeahstu.com</link>
	<description>What I Like and What I&#039;ve Learned</description>
	<lastBuildDate>Thu, 26 Aug 2010 00:12:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.yeahstu.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/0338f55ca58478a8e600c28652e6b57b?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Midwest Developer Insights &#187; Azure</title>
		<link>http://blog.yeahstu.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.yeahstu.com/osd.xml" title="Midwest Developer Insights" />
	<atom:link rel='hub' href='http://blog.yeahstu.com/?pushpress=hub'/>
		<item>
		<title>My First Experience with Microsoft Windows Azure</title>
		<link>http://blog.yeahstu.com/2009/12/13/my-first-experience-with-microsoft-windows-azure/</link>
		<comments>http://blog.yeahstu.com/2009/12/13/my-first-experience-with-microsoft-windows-azure/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 08:42:04 +0000</pubDate>
		<dc:creator>Stu</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Azure]]></category>

		<guid isPermaLink="false">http://blog.yeahstu.com/?p=37</guid>
		<description><![CDATA[Configuring a Development Environment with Microsoft Windows Azure Blob Storage requires using a pre-determined Microsoft Shared Key and running it in its own solution...<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.yeahstu.com&amp;blog=10180494&amp;post=37&amp;subd=yeahstu&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This week I received my Microsoft Windows Azure invitation token, so I began integrating it into a project of mine.  I wanted to use just the Blob Storage to upload and download large media files to the cloud.</p>
<p>At first, I was trying to follow <a id="glbx" title="this link" href="http://blogs.msdn.com/jnak/archive/2008/10/29/walkthrough-simple-blob-storage-sample.aspx">this link</a> as much as possible to get up and running.  The walk-through seemed simple and helped me to quickly understand how to use Blob Storage.  However, once I created the new Azure service in my existing solution I was quickly led to make decisions that influenced the web project I had already created:</p>
<ol>
<li>In order to get the Azure processes to run in the background while my web application ran, I had to set the Cloud Service project as the startup project. <a href="http://yeahstu.files.wordpress.com/2009/12/setasstartupproject.jpg"><img class="aligncenter size-medium wp-image-36" title="SetAsStartupProject" src="http://yeahstu.files.wordpress.com/2009/12/setasstartupproject.jpg?" alt="Set As Startup Project" /></a></li>
<li>A Cloud Service project cannot just run by itselt, it requires a web role.  The simplest thing to do seemed to be to set this to my pre-existing web project.</li>
<li>This all worked well at first.  My web project recognized my local azure service and worked normally.  However, once I tried to upload files to my local Blob Storage I received errors.  It behaved as if there was an issue with the Trust Level that the web role runs under.</li>
</ol>
<p>Since Azure is still in CTP (meaning free) and I have a brand new account (meaning no pre-existing files have been uploaded), my solution was to test my web upload with a deployed, in &#8220;production&#8221;, Blob Storage service.  I updated my web.config file and fairly quickly was able to upload and download files from blob storage.  I was somewhat impressed with how easy it was to do.</p>
<p>Unfortunately, this created a whole new set of concerns.  Since I am forced to use my production account for Blob Storage, how can I test in my local environment going forward?  Once Azure is launched (reportedly on 02/01/2010), any testing I do will begin to incur significant costs and it will also interfere with production data.</p>
<p>After some deep thinking, some more research and stumbling across <a id="pqtj" title="this MSDN link" href="http://msdn.microsoft.com/en-us/library/dd320275.aspx">this MSDN link</a>, I believe I backed my way into the solution that Microsoft imagined in the first place.</p>
<p>Microsoft has allocated a specific development shared key for local blob storage.  Therefore, one only has to use these standard configuration settings in the local Blob Storage service (ServiceConfiguration.cscfg file).</p>
<div style="padding-bottom:12px;">
<div>&lt;ConfigurationSettings&gt;</div>
<div>&lt;Setting name=&#8221;AccountName&#8221; value=&#8221;devstoreaccount1&#8243; /&gt;</div>
<div>&lt;Setting name=&#8221;AccountSharedKey&#8221; value=&#8221;Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==&#8221; /&gt;</div>
<div>&lt;Setting name=&#8221;BlobStorageEndpoint&#8221; value=&#8221;http://127.0.0.1:10000/&#8221; /&gt;</div>
<div>&lt;/ConfigurationSettings&gt;</div>
</div>
<p>The piece of the puzzle that I was missing is that this Blob Storage service must run from outside my main solution.  Therefore, I put the Blob Storage service project in its own solution and attached it to a dummy web role.  When I run it, it starts the development Azure services and runs in the background.</p>
<p>Attaching to the Blob Storage service from my web project is easy.  I just make sure that I have the below configuration set in my web.config file.</p>
<div style="padding-bottom:12px;">
<div>&lt;configuration&gt;</div>
<div>&lt;appSettings&gt;</div>
<div>&lt;add key = &#8220;AccountName&#8221; value=&#8221;devstoreaccount1&#8243;/&gt;</div>
<div>&lt;add key = &#8220;AccountSharedKey&#8221; value=&#8221;Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==&#8221;/&gt;</div>
<div>&lt;add key=&#8221;BlobStorageEndpoint&#8221; value=&#8221;<a href="http://127.0.0.1:10000"></a>http://127.0.0.1:10000&#8243;/&gt;</div>
<div>&lt;/appSettings&gt;</div>
<div>&lt;configuration&gt;</div>
</div>
<p>Now I can test uploads and downloads on my local machine.</p>
<p><strong>Special Note</strong>:  The Windows Azure development environment uses a different URI format to access files.  In production, files stored in public containers can be accessed via this format:</p>
<blockquote><p>http://&lt;account-name&gt;.blob.core.windows.net/&lt;resource-path&gt;</p></blockquote>
<p>However, in the development environment, a different format is used:</p>
<blockquote><p>http://&lt;local-machine-address&gt;:&lt;port&gt;/&lt;account-name&gt;/&lt;resource-path&gt;</p></blockquote>
<p>See <a href="http://msdn.microsoft.com/en-us/library/dd179425.aspx">this MSDN Article</a> for more information.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yeahstu.wordpress.com/37/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yeahstu.wordpress.com/37/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yeahstu.wordpress.com/37/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.yeahstu.com&amp;blog=10180494&amp;post=37&amp;subd=yeahstu&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.yeahstu.com/2009/12/13/my-first-experience-with-microsoft-windows-azure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2eb31b18606f0405b1e28dbda6c974fc?s=96&#38;d=identicon&#38;r=PG" medium="image">
			<media:title type="html">Stu</media:title>
		</media:content>

		<media:content url="http://yeahstu.files.wordpress.com/2009/12/setasstartupproject.jpg?" medium="image">
			<media:title type="html">SetAsStartupProject</media:title>
		</media:content>
	</item>
	</channel>
</rss>