Windows Azure: length of blob remains 0
azure, azure-blob-storage, azure-storage, azure-table-storage, c#
Solution
Call `blob.FetchAttributes()`. `GetBlockBlobReference` doesn't actually make any calls to the blob service. It just constructs a local object that represents the blob.
Problem
I'm confused about how to get size of the blob in Windows Azure. In my case, I first get the blob reference with `CloudBlockBlob blob = container.GetBlockBlobReference(foo);`(here foo is name of blob and I'm sure the blob exists). Then I try to get blob size `blob.Property.Length;` However, it always return `0`. I breakpoint at this statement and track content inside `blob`: `uri` of the blob is correct, can I infer that the blob is correctly retrieved from that? While all the fields in `Properties` is either `null` or `0`. I cannot figure out a solution. Is it because I currently emulate the app locally in `Storage Emulator` and will be OK after the deployment? Thanks and Best Regards.