title: How do I programatically get my Azure storage endpoint URLs?
body: <p>I'm fairly new to Azure and I'm using Blob storage to store some binary images, but I can't seem to figure out how to programatically get my Azure storage endpoint URLs?</p>
  
  <p>I am trying to render out some <code>&lt;img&gt;</code> tags that render correctly locally using the simulator, or when deployed to my live Azure instance.</p>
  
  <p>So for example if I launch my site locally it would render out as:</p>
  
  <pre><code>&lt;img src="http://127.0.0.1:10000/devstoreaccount1/uploads/image.jpg" /&gt;
  </code></pre>
  
  <p>and when deployed to Azure it would render out as:</p>
  
  <pre><code>&lt;img src="http://example.blob.core.windows.net/uploads/image.jpg" /&gt;
  </code></pre>
  
  <p>Obviously one way would be to just store it as a setting in my <strong>ServiceConfiguration.Local.cscfg</strong> and <strong>ServiceConfiguration.Cloud.cscfg</strong> files, but there must be a way to get this value programatically.</p>
  
  <p><img src="https://i.stack.imgur.com/bS5a8.png" alt="enter image description here"></p>