Share via


ERROR_UNSUPPORTED_OS seen with Windows Azure Drives

When running in the cloud, a few customers have reported that CloudDrive.InitializeCache() and CloudDrive.Mount() occasionally fail with ERROR_UNSUPPORTED_OS when running with SDK 1.3.    This error can occur when your service calls a CloudDrive API before the Azure CloudDrive service has been started by the operating system. In older versions of the SDK, your application was started later, so the Azure CloudDrive service would have already been running.

We will fix this issue in a future release. In the meantime, we recommend working around the issue by retrying the first CloudDrive API your service calls. The following is an example of code that retries the CloudDrive.InitializeCache() operation.   A similar loop should be placed around any CloudDrive APIs that your application may call first, including CloudDrive.Create, CloudDrive.Mount, and/or CloudDrive.GetMountedDrives.

 For (int i = 0; i < 30; i++)
{
       try
       {
           CloudDrive.InitializeCache(localCache.RootPath,localCache.MaximumSizeInMegabytes);
           break;                   
       }
       catch (CloudDriveException ex)
       {
           if (!ex.Message.Equals("ERROR_UNSUPPORTED_OS") || i == 29)
                 throw;
           Thread.Sleep(10000);
       }
}

Windows Azure Storage team