<?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/"
	>

<channel>
	<title>Azure Support &#187; Azure Storage</title>
	<atom:link href="http://www.azuresupport.com/tag/azure-storage/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.azuresupport.com</link>
	<description>Windows Azure Tutorial</description>
	<lastBuildDate>Mon, 25 Apr 2011 10:32:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Queue Polling In Azure</title>
		<link>http://www.azuresupport.com/2010/02/queue-polling-in-azure/</link>
		<comments>http://www.azuresupport.com/2010/02/queue-polling-in-azure/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 12:47:39 +0000</pubDate>
		<dc:creator>azuresupport</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Azure Storage]]></category>
		<category><![CDATA[Queue]]></category>

		<guid isPermaLink="false">http://www.azuresupport.com/?p=608</guid>
		<description><![CDATA[In a previous tutorial we showed how to create and receive a message from queue , we can now adding polling The MessageQueue class in StorageClient contains the polling inbuilt  infrastructure and delivers the message via eventing: mqObj.MessageReceived += new MessageReceivedEventHandler(mqObj_MessageReceived); mqObj.PollInterval = 1000; // poll interval in milliseconds mqObj.StartReceiving(); // starts polling The event [...]]]></description>
			<content:encoded><![CDATA[<p>In a previous tutorial we showed how to <a href="http://www.azuresupport.com/2010/02/creating-an-azure-queue-service/">create and receive a message from queue </a>, we can now adding polling</p>
<p>The <span style="font-family: Courier New;">MessageQueue</span> class in StorageClient contains the polling inbuilt  infrastructure and delivers the message via eventing:</p>
<p>mqObj.MessageReceived += new MessageReceivedEventHandler(mqObj_MessageReceived);<br />
mqObj.PollInterval = 1000; // poll interval in milliseconds<br />
mqObj.StartReceiving(); // starts polling</p>
<p><span style="font-size: medium;"><span style="font-size: medium;"> </span></p>
<p><span style="font-size: medium;"><span style="color: #000000; font-size: x-small;">The event handler fires whenever a message is received, in addition, when there are no more messages the client will begin polling the queue at the  <span style="font-family: Courier New;">PollInterval</span></span></span></p>
<p><span style="font-size: medium;"><span style="color: #000000; font-size: x-small;">In this code sample no timeout is set and so the default is selected from the <span style="font-family: Courier New;">Timeout</span> property of the <span style="font-family: Courier New;">MessageQueue</span> class (which in turn defaults to 30 seconds).</span></span></p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.azuresupport.com/2010/02/queue-polling-in-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating an Azure Queue Service</title>
		<link>http://www.azuresupport.com/2010/02/creating-an-azure-queue-service/</link>
		<comments>http://www.azuresupport.com/2010/02/creating-an-azure-queue-service/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 09:35:00 +0000</pubDate>
		<dc:creator>azuresupport</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Azure Storage]]></category>
		<category><![CDATA[Queue]]></category>

		<guid isPermaLink="false">http://www.azuresupport.com/?p=601</guid>
		<description><![CDATA[This simple tutorial demonstrates how to create a message on a queue and receive that message: 1. Set up Authentication Details and Create a New Queue The below code adds the the storage authentication details, creates a queue storage object (which is the storage container that the Message Queues are placed in), then creates a [...]]]></description>
			<content:encoded><![CDATA[<p>This simple tutorial demonstrates how to create a message on a queue and receive that message:</p>
<h3>1. Set up Authentication Details and Create a New Queue</h3>
<p>The below code adds the the storage authentication details, creates a queue storage object (which is the storage container that the Message Queues are placed in), then creates a message queue and finally adds a message to that queue:</p>
<p>string accName = &#8220;devacc1&#8243;;</p>
<p>string accKey = &#8220;accountKeyStringxxxx&#8221;;</p>
<p>string address = &#8220;http://127.0.0.1:10001&#8243;;</p>
<p>StorageAccountInfo acObj = new StorageAccountInfo(new Uri(address), null, accName, accKey);</p>
<p>QueueStorage qsObj = QueueStorage.Create(acObj);</p>
<p>MessageQueue mqObj = qsObj.GetQueue(&#8220;azureSupportString&#8221;);</p>
<p>mq.CreateQueue();</p>
<p>Message msgObj = new Message(DateTime.Now.ToString());</p>
<p>mqObj.PutMessage(msgObj);</p>
<h3>2. Receiving a Message from the Queue</h3>
<p>The code for receiving a message from a queue is very straightforward. Use the GetMessage method of the MessageQueue with the time out in seconds passed in as a parameter. This timeout is the time that routine has a lock on the message, if it is not deleted within the timeout time other processes will be able to access it. <br />
 The GetMessage method returns null if there is no message on the queue so your code needs to check for that. Also note that the message remains on the queue if it is not deleted so call the DeleteMessage method to delete the message.</p>
<p>Message msgObj = mqObj.GetMessage(3);<br />
 if (msgObj != null)<br />
 {<br />
 Console.WriteLine(msgObj.ContentAsString());<br />
 mqObj.DeleteMessage(msgObj);<br />
 }</p>
<p>We can also add <a href="http://www.azuresupport.com/2010/02/queue-polling-in-azure/">Queue Polling </a>to this routine</p>
]]></content:encoded>
			<wfw:commentRss>http://www.azuresupport.com/2010/02/creating-an-azure-queue-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Azure Drive Beta Launched [News]</title>
		<link>http://www.azuresupport.com/2010/02/windows-azure-drive-beta-launched-news/</link>
		<comments>http://www.azuresupport.com/2010/02/windows-azure-drive-beta-launched-news/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 08:58:58 +0000</pubDate>
		<dc:creator>azuresupport</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Azure Drive]]></category>
		<category><![CDATA[Azure Storage]]></category>

		<guid isPermaLink="false">http://www.azuresupport.com/?p=565</guid>
		<description><![CDATA[Microsoft just announced the Beta availability of  Windows Azure Drive. Azure Drive joins the exiting storage lineup of blobs, tables and queues and is likely to be the last storage category to be introduced in 2010. Azure Drive is primarily intended for developers migrating existing apps to Azure. Drive storage uses  the standard Windows NTFS [...]]]></description>
			<content:encoded><![CDATA[<p>Microsoft just announced the Beta availability of  Windows Azure Drive. Azure Drive joins the exiting storage lineup of blobs, tables and queues and is likely to be the last storage category to be introduced in 2010. Azure Drive is primarily intended for developers migrating existing apps to Azure. Drive storage uses  the standard Windows NTFS API&#8217;s to access a durable drive, applications using these API&#8217;s can therefore be migrated to Windows Azure with minimal modification to the storage read/write code.</p>
<p>See the <a href="http://blogs.msdn.com/windowsazure/archive/2010/02/02/beta-release-of-windows-azure-drive.aspx">full announcement</a> for more details.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.azuresupport.com/2010/02/windows-azure-drive-beta-launched-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Azure Storage to an Azure Application</title>
		<link>http://www.azuresupport.com/2010/02/add-azure-storage-to-an-azure-application/</link>
		<comments>http://www.azuresupport.com/2010/02/add-azure-storage-to-an-azure-application/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 07:14:36 +0000</pubDate>
		<dc:creator>azuresupport</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Azure Storage]]></category>
		<category><![CDATA[Blobs]]></category>

		<guid isPermaLink="false">http://www.azuresupport.com/?p=532</guid>
		<description><![CDATA[We previously looked at Creating an Azure App in Visual Studio and then Deploying the App on Azure . The application we built was a very simple one requiring no storage, we now turn our attention to extending the demo application to include Azure Storage. For this example we will use the blob storage in [...]]]></description>
			<content:encoded><![CDATA[<p>We previously looked at <a href="http://www.azuresupport.com/2010/01/azure-tutorial-building-a-hello-azure-app-in-visual-studio/">Creating an Azure App in Visual Studio</a> and then <a href="http://www.azuresupport.com/2010/01/publish-and-deploy-an-application-on-windows-azure/">Deploying the App on Azure </a>. The application we built was a very simple one requiring no storage, we now turn our attention to extending the demo application to include Azure Storage. For this example we will use the blob storage in a simple Web Role.</p>
<h3>Creating Local Blob Storage</h3>
<ol>
<li>First we need to set up connection string to the Azure storage account. In the Cloud Service project in the Visual Studio Solution Explorer double-click the role which will use Azure storage in the Roles folder. This should bring up the configuration page for the Role. Navigate to the Settings tab and click &#8216;Add Setting&#8217; , then provide a name for the setting (such as StorageConnectionString) , set the type to ConnectionString and click the &#8216;&#8230;&#8217; button in the Value field. This will bring up the Storage Connection String dialog. Initially we will be developing and testing the storage on the local server so select the Use Development Storage radio button and click OK:	<br />
 <img class="alignnone size-full wp-image-540" title="ScreenHunter_01 Feb. 02 13.06" src="http://64.207.144.116/wp-content/uploads/2010/02/ScreenHunter_01-Feb.-02-13.061.gif" alt="" width="531" height="454" /> </li>
<li>In the code behind for the page which will interact with the blob storage add the following declaration to the top of the page to import the relevant namespaces (for a larger project this should be done in the web.config)
<div class="code">using Microsoft.WindowsAzure;<br />
 usingMicrosoft.WindowsAzure.StorageClient;</div>
</li>
<li>Add an instance of an Azure storage account :
<div class="code">CloudStorageAccount account = CloudStorageAccount.FromConfigurationSetting(&#8220;StorageConnectionString&#8221;);</div>
</li>
<li>Create a CloudBlobClient object which will perform the main blob functions against the storage account. Then use the BlobClient object to create a CloudBlobContainer (all blobs must be stored in a container):
<div class="code">CloudBlobClient blobClient = account.CreateCloudBlobClient();<br />
 CloudBlobContainer container = blobClient.GetContainerReference(&#8220;hellocloud&#8221;);</div>
</li>
<li>Now we need to set the viewing permissions for the blob, in this example we will be setting the blob for public access so it can be viewed by anyone. This is done at the container level by creating a BlobContainerPermissions object and setting the object&#8217;s permissions to public and then passing the object to the container&#8217;s SetPermissions method.
<div class="code">BlobContainerPermissions containerPermissions = new BlobContainerPermissions();<br />
 containerPermissions.PublicAccess = BlobContainerPublicAccessType.Container;<br />
 container.SetPermissions(containerPermissions);</div>
</li>
<li>Create an CloudBlockBlob object which will manage the individual blob and then set the URI to access the blob:
<div class="code">CloudBlockBlob blob;<br />
 blob = container.GetBlockBlobReference(Guid.NewGuid().ToString());</div>
</li>
<li>For this example we will simply place a string in the blob (however it could be used for a file using the Upload file method of the blob object.
<div class="code">blob.UploadText(&#8220;AzureSupport text&#8221;)</div>
</li>
<li>The blob is now available at the URI:
<div class="code">blob.Uri.ToString()</div>
</li>
</ol>
<h3>Move the Blob Storage to Azure online storage</h3>
<ol>
<li>Navigate to your Windows Azure developer portal, and click &#8220;New Service&#8221; (which is located above the Windows Azure tab).</li>
<li>Click Storage Account</li>
<li>Enter a Service Label and click Create</li>
<li>On the Create a Service &#8211; Storage Account page, enter a Public Storage Account Name and then configure the Storage Account Affinity Group (it is recommended that you create a new affinity group if there is not existing groups). Click &#8216;Create&#8217; and the storage should be created. </li>
<li>We will now modify the Connection String for the Visual Studio project to point to this account. To do this we need to repeat Step 1 of <strong>Create Local Blob Storage </strong>above, but enter select the Enter Storage Credentials radio button and enter the Account Name we just created and the  Access Key (which is the Primary Access Key shown in the Azure developer portal). You can also specify the endpoints for accessing the storage:<br />
 <img class="alignnone size-full wp-image-546" title="ScreenHunter_02 Feb. 02 15.08" src="http://64.207.144.116/wp-content/uploads/2010/02/ScreenHunter_02-Feb.-02-15.081.gif" alt="" width="590" height="384" /></li>
<li>Now you can deploy your application as shown in the <a href="../2010/01/publish-and-deploy-an-application-on-windows-azure/">Deploying the App on Azure</a> tutorial. You can also enable the <a href="http://www.azuresupport.com/2010/02/azure-cdn-content-delivery-network-app/">Azure CDN </a>for your app.</li>
</ol>
<p><br class="spacer_" /></p>
<p><br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.azuresupport.com/2010/02/add-azure-storage-to-an-azure-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

