Troubleshooting Windows Azure drive initialization

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric





Issue I: Drives do not support https

Exception of type 'Microsoft.WindowsAzure.CloudDrive.Interop.InteropCloudDriveException' was thrown.

[HttpException (0x80004005): ERROR_HTTPS_NOT_SUPPORTED]


Use HTTP be removing ‘S’ (see below).

<Setting name="CloudStorageAccount" value="DefaultEndpointsProtocol=https;AccountName=xyz..=" />

Issue II:  UnauthorizedAccessException on local cache initialization:

When you try to initialize the drive in Windows Azure you will implement peace of code like this one:

localCache = RoleEnvironment.GetLocalResource("MyAzureDriveCache");

CloudDrive.InitializeCache(localCache.RootPath, localCache.MaximumSizeInMegabytes);

Depending on type and value of ‘MyAzureDriveCache, the cache initialization of the drive can succeed or fail. If this variable is a string which defines the physical path like “c:\mycachefolder”, you will probably run into following issue.

Cannot access the path … Access denied.


If the drive mount is created within IIS host, this will for sure fail. To avoid this issue, you have to ensure that MyAzureCache is defined in config-Resources and not in settings.



This is how this does looks like in ServiceDefinition.csdef:

      <LocalStorage name="MyAzureDriveCache" cleanOnRoleRecycle="false" sizeInMB="100" />

Issue III:

Cannot combine incompatible absolute URIs base '' relative ''.When trying to combine 2 absolute URIs, the base URI should be a valid base of the relative Uri.

You have used the Drive URI like:

You should use following URI:

Please note that following is not allowed too (note the slash at the beginning): /documents/drive.vhd

Issue IV: How to upload Page-Blob

After all, when you think all issues have been fixed, you might get following error:


This is one of errors which really describes the exact problem. You are trying to mount to blob which is uploaded as block-blob and not as Page-Blob.

Issue V: How to upload huge blobs?

Take a look on Kevin's sample which asynchronously transfers huge amount of data:

Posted Jan 16 2012, 10:58 PM by Damir Dobric
Filed under: , , is a .Net Community Blog powered by daenet GmbH.