Blob storage access from Azure App Service
<p>I have an issue with accessing blob storage from an App Service Mobile App (Not MobileService). I previously have had a MobileService running that accessed the Blob Storage in the following way:</p>

<pre><code>// Set the URI for the Blob Storage service.
Uri blobEndpoint = new Uri(string.Format("https://{0}.blob.core.windows.net", storageAccountName));

// Create the BLOB service client.
CloudBlobClient blobClient = new CloudBlobClient(blobEndpoint,
new StorageCredentials(storageAccountName, storageAccountKey));
</code></pre>

<p>Updating the code to work on the new service, still did not help. The dataconnection seems correct:
<img src="https://i.stack.imgur.com/jF2Wr.png" width="300" height="150"/></p>

<p>Therefore referring to these links <a href="https://msdn.microsoft.com/library/system.configuration.configurationmanager.aspx" rel="nofollow noreferrer">azure configuration</a> | <a href="https://azure.microsoft.com/en-us/documentation/articles/storage-configure-connection-string/" rel="nofollow noreferrer">azure connection string</a> | <a href="https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs/" rel="nofollow noreferrer">azure get started blob storage</a>. </p>

<p>I have extracted the data connection and have implemented the `MS_AzureStorageAccountConnectionString. I have the following methods to verify the correct access is found: </p>

<pre><code>string tempstorage = "";
try
{
    CloudStorageAccount storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("MS_AzureStorageAccountConnectionString"));
    tempstorage = storageAccount.BlobEndpoint.ToString() + "        " + storageAccount.BlobStorageUri.ToString();

    //Uri blobEndpoint = storageAccount.TableStorageUri.GetUri(StorageLocation.Primary);
}
catch
{
}
string cloud = "";
try
{
    CloudStorageAccount temp = CloudStorageAccount.DevelopmentStorageAccount;
    Uri endPoit = temp.BlobEndpoint;
    string uri = temp.BlobStorageUri.ToString();
    cloud = uri + "           " + endPoit.ToString();
 }
 catch
 {
 }
 return Ok("coud : " + cloud + "       temp storage : " + tempstorage);
</code></pre>

<p>return value:</p>

<blockquote>
  <p>coud : Primary = '<a href="http://127.0.0.1:10000/devstoreaccount1" rel="nofollow noreferrer">http://127.0.0.1:10000/devstoreaccount1</a>'; Secondary = '<a href="http://127.0.0.1:10000/devstoreaccount1-secondary" rel="nofollow noreferrer">http://127.0.0.1:10000/devstoreaccount1-secondary</a>'           <a href="http://127.0.0.1:10000/devstoreaccount1" rel="nofollow noreferrer">http://127.0.0.1:10000/devstoreaccount1</a>       temp storage :             </p>
</blockquote>

<p>This shows the access is to the <code>Storage emulator</code> which is not desired.</p>

<h1>Question</h1>

<p>How to get the <code>Uri</code> for the <code>Azure online storage</code> such as to access it from the <code>Azure app service</code>.</p>

<p><strong>Update based on the comment</strong></p>

<p>I interpreted the request for cloud configuration as the application settings for the <code>App Service</code> on the azure portal.</p>

<p><img src="https://i.stack.imgur.com/fvbkD.png" width="450" height="400"/></p>

<pre><code>&lt;configuration&gt;
     &lt;connectionStrings&gt;
         &lt;add name="MS_AzureStorageAccountConnectionString" connectionString="DefaultEndpointsProtocol=https;AccountName=Name;AccountKey=key1_from_access_Keys" /&gt;
     &lt;/connectionStrings&gt;
&lt;configuration&gt;
</code></pre>