locked
Blob Not Stored in Container RRS feed

  • Question

  • Hello,

     

    Hello,
    
    After following this helpful link from msdn "http://msdn.microsoft.com/en-us/gg271293", the blob is stored well in local development
    but not in production.
    
    <img src="<%=GetContainer().GetBlobReference("flower.jpg")).Uri.ToString%>" />
    
    Rendered Output (local):
    <img src="http://127.0.0.1:10000/devstoreaccount1/galleryimage/flower.jpg" />
    
    Rendered Output (production):
    <img src="http://myaccountname.blob.core.windows.net.blob.core.windows.net/galleryimage/flower.jpg" />
    
    If you noticed that the "blob.core.windows.net" repeats twice, this does not reference my storage account at all.
    
    
    ServiceConfiguration.Cloud.cscfg
        <ConfigurationSettings>
          <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=http;AccountName=myaccountname.blob.core.windows.net;AccountKey=++" />
          <Setting name="ContainerName" value="galleryimage" />
        </ConfigurationSettings>
    
    ServiceConfiguration.Local.cscfg
        <ConfigurationSettings>
          <Setting name="DataConnectionString" value="UseDevelopmentStorage=true" />
          <Setting name="ContainerName" value="galleryimage" />
        </ConfigurationSettings>
    


    Thank You,

    -imperialx

    Monday, January 2, 2012 5:01 PM

Answers

  • The DataConnectionString setting is wrong for the cloud configuration. It should be:

    <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=http;AccountName=myaccountname;AccountKey=++" />
    
    

    • Marked as answer by Harold Jim Tuesday, January 3, 2012 12:49 AM
    Monday, January 2, 2012 10:05 PM
    Answerer

All replies

  • The DataConnectionString setting is wrong for the cloud configuration. It should be:

    <Setting name="DataConnectionString" value="DefaultEndpointsProtocol=http;AccountName=myaccountname;AccountKey=++" />
    
    

    • Marked as answer by Harold Jim Tuesday, January 3, 2012 12:49 AM
    Monday, January 2, 2012 10:05 PM
    Answerer
  • You're a big help. Thanks!
    Tuesday, January 3, 2012 12:49 AM