Synchronizing Files to Windows Azure Storage

Shows how to synchronize files from a local file system to Windows Azure Storage. The local file system is represented by Sync Framework's file synchronization provider and Windows Azure Storage is represented by a simple custom provider.

C# (108.4 KB)
4.9 Star
4,198 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • problems with Microsoft Azure, synchronize files with Azure Blob Storage
    1 Posts | Last post November 21, 2017
      problems when using the version WindowsAzure.Storage v2.0
      what data represents Attributes Key in azure client that you used
      fileAttributes = (FileAttributes)long.Parse(blob.Metadata[AzureBlobStore.AttributesKey]);
      also problems with :System.NotImplementedException: 'Absolute Path Not Supported'
  • Getting error on blob.Metadata[AzureBlobStore.CreationTimeKey]
    1 Posts | Last post September 27, 2012
    • Sync from Local folder to the Azure container works fine. When I add a blob to the Azure Storage & try to sync it down to the local folder, I get error at the line creationTime = DateTime.Parse(blob.Metadata[AzureBlobStore.CreationTimeKey]); which is inside the method GetFileRetriever.
      Can any one help me resolve this issue.
  • Error in delete method
    1 Posts | Last post May 08, 2012
    • There is a bug in the implementation of the delete method, look here: 
      // If this is a directory then we need to look for children. 
                  if (isDirectory) 
                      IEnumerable<IListBlobItem> items = Container.ListBlobs(); 
                      if (items.Count() > 0) 
                          throw new ApplicationException("Constraint Violation - Directory Not Empty"); 
      The problem is that looking for the children is done on the wrong way, you are making a count of the items in the Container and not the ones beneath the directory. 
      So if someone deletes a directory this wil cause always an exception because there is always a children in the container (the directory you are trying to delete) 
  • Pb with metadatas
    1 Posts | Last post September 05, 2011
    • I'm having a pb running this sample. My metadatas are always null:
      creationTime = DateTime.Parse(blob.Metadata[AzureBlobStore.CreationTimeKey]);
      lastAccessTime = DateTime.Parse(blob.Metadata[AzureBlobStore.LastAccessTimeKey]);
  • Error
    1 Posts | Last post June 10, 2011
    • Using the code, and my own store, everything is uploaded fine. However, the AzureBlobSyncProvider.EnumerateItems() methods throws an exception in context.ReportItems(). Stack trace:
      Message	"Value does not fall within the expected range."
         at Microsoft.Synchronization.SimpleProviders.Interop.IFullEnumerationCallback.ReportItems(UInt32 cItems, SafeHandle pItemKeyAndVersions)
         at Microsoft.Synchronization.SimpleProviders.FullEnumerationContext.ReportItems(IEnumerable`1 items)
         at OneLogic.LegalObjects.Managers.FileSync.AzureBlobSyncProvider.EnumerateItems(FullEnumerationContext context) in D:\source\Credenza\OutLaw\Source\Outlook Client Extension\OneLogic.Legal\Managers\FileSync\AzureBlobSyncProvider.cs:line 217
      The error is in the MS code down below ours.  Has this been seen before?
  • Encryption?
    1 Posts | Last post June 10, 2011
    • The fileprovider provides a stream to the descendant class. This stream is a filestream of the document to be sync'd. However, in Azure, we would prefer that this stream be encrypted for obvious reasons. How to do this?