<?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>Storage Archives - Blog IT</title>
	<atom:link href="https://blogit.create.pt/category/cloud/microsoft-azure/storage/feed/" rel="self" type="application/rss+xml" />
	<link>https://blogit.create.pt/category/cloud/microsoft-azure/storage/</link>
	<description>Create IT blogger community</description>
	<lastBuildDate>Thu, 10 Jan 2019 12:46:13 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>Azure Blob Storage Metadata 400 Bad Request</title>
		<link>https://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/</link>
					<comments>https://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/#respond</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Fri, 10 Nov 2017 13:52:28 +0000</pubDate>
				<category><![CDATA[Storage]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<guid isPermaLink="false">http://blogit.create.pt/ricardocosta/?p=1864</guid>

					<description><![CDATA[<p>I was getting a 400 Bad Request when inserting blobs in Azure Blob Storage because I was setting metadata with non-ASCII characters. According to Microsfot documentation: &#8220;You will receive a 400 Bad Request if any name/value pairs contain non-ASCII characters. Metadata name/value pairs are valid HTTP headers, and so must adhere to all restrictions governing HTTP [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/">Azure Blob Storage Metadata 400 Bad Request</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I was getting a 400 Bad Request when inserting blobs in Azure Blob Storage because I was setting metadata with non-ASCII characters.</p>
<pre class="brush: csharp; highlight: [15]; title: ; notranslate">

// Retrieve storage account from connection string.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting(&quot;StorageConnectionString&quot;));

// Create the blob client.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();

// Retrieve a reference to a container.
CloudBlobContainer container = blobClient.GetContainerReference(&quot;mycontainer&quot;);

// Create the container if it doesn't already exist.
container.CreateIfNotExists();

// Add some metadata to the container.
container.Metadata.Add(&quot;docType&quot;, &quot;textDocuments&quot;);

</pre>
<p>According to Microsfot documentation:</p>
<p><em>&#8220;You will receive a 400 Bad Request if any name/value pairs contain non-ASCII characters. Metadata name/value pairs are valid HTTP headers, and so must adhere to all restrictions governing HTTP headers. It is therefore recommended that you use URL encoding or Base64 encoding for names and values containing non-ASCII characters.&#8221;</em></p>
<p><a href="https://docs.microsoft.com/en-us/azure/storage/blobs/storage-properties-metadata">https://docs.microsoft.com/en-us/azure/storage/blobs/storage-properties-metadata</a></p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/">Azure Blob Storage Metadata 400 Bad Request</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2017/11/10/azure-blob-storage-metadata-400-bad-request/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
