Freigeben über


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

Comments

  • Anonymous
    March 02, 2011
    I keep getting this exception and this solution doesn't solve the problem (event after 30 tries)

  • Anonymous
    March 02, 2011
    The comment has been removed

  • Anonymous
    October 04, 2011
    Have it been fixed in 1.5?

  • Anonymous
    October 05, 2011
    Hi Rafiki, We have made some improvements, but there is still a chance of seeing this, so we still recommed putting this loop in your code. Thanks Andrew Edwards Windows Azure Storage