none
CloudDrive.InitializeCache is failing with 1.3

    Question

  • I have code that has worked for months in 1.2 and with 1.3 I am getting an exception.

    Specifically, when calling CloudDrive.InitializeCache I am getting an InteropCloudDriveException with the ERROR_UNSUPPORTED_OS  code.  This is happening in development

    My cache path is set to:

    C:\\Users\\marc.kuperstein\\AppData\\Local\\dftmp\\s0\\deployment(1495)\\res\\deployment(1495).EveryPenny.PublicWeb.0\\directory\\LocalCache\\"

    Heard rumor that CloudDrive had issues in 1.3 but haven't seen anything official (yet)

    Any/all help is appreciated

    marc
     

    Wednesday, December 01, 2010 9:57 PM

Answers

  • The workaround to use Azure Drives on dev fabric is to use IIS Hosted Web Core. You can do that by disabling full IIS mode by commenting out the sites element in the servicedefinition.csdef. Here's an example

    <!--

     

     

    <Sites>

    <Site name="Web">

    <Bindings>

    .....

    </Bindings>

    </Site>

    </Sites>

     

     

    -->

     

    Friday, December 03, 2010 11:50 PM

All replies

  • I set a global variable 'driveLetter' after mounting the drive and use it later in the MVC controller. Mounting drive code executes inside OnStart method in the web role and sets the global variable fine. But returns global variable as null during the run time inside the MVS controller. This code use to work in 1.2 but fails in 1.3.

    So just for kicks, I moved mounting the drive code from web role OnStart method to to controller and now I am getting the following error:

    Microsoft.WindowsAzure.StorageClient.CloudDriveException was unhandled by user code   Message=ERROR_UNSUPPORTED_OS  Source=Microsoft.WindowsAzure.CloudDrive  StackTrace:at Microsoft.WindowsAzure.StorageClient.CloudDrive.InitializeCache(String cachePath, Int32 totalCacheSize)

    I appreciate any insights/help to resolve this error.

    Thanks, Harish

    Thursday, December 02, 2010 12:38 AM
  • I set a global variable 'driveLetter' after mounting the drive and use it later in the MVC controller.

    You should probably be aware of the following comment by Andrew Edwards on this Azure Forum thread:

    When you mount a Windows Azure Drive, a thread is created in your process to maintain the temporary signature the drive uses to authenticate with Windows Azure Storage.  If your process exits, this thread is destroyed and your drive will be unmounted in about 30 minutes because the authentication stops working.  I'm guessing this is what is happening.  The workaround is to call Mount() every time you need the drive.  If the drive is already mounted, Mount() will return very quickly with the current drive letter.

    I upgraded a project using an Azure Drive to the Azure SDK v1.3 and was able to run it with no problem. My OS is Windows Server 2008 R2 Standard.

    Thursday, December 02, 2010 1:00 AM
    Answerer
  • I had originally mounted the CloudDrive inside of OnStart but moved it to Global.asax (Application_Start).  But, I'm getting this exception.

    I'm not sure the answer address the exception being thrown by InitializeCache.  I'm on Win7 and I'd expect this to work. 

    Thoughts?


    - marc
    Thursday, December 02, 2010 2:30 AM
  • Looks like the drive can be mounted only from OnStart event. Move the code back to OnStart and it should work. Anyways, even i am waiting for an answer why is it mandatory to mount drive from OnStart event only. I used to mount it even in the PAge_Load event of my Web App using SDK 1.2

    TechyFreak | Mobile Development Resources
    Thursday, December 02, 2010 8:50 AM
  • The local cloud drive simulation uses a "substed" drive to mount the drive. In full IIS mode, if you mount the drive during OnStart, the drive is not available to the web site because the role entry point and the site execute with different account credentials--substed drives are per user. It should work in Windows Azure though because the drive is available to all processes in the machine.

    To test locally, if you don't need it, you could disable full IIS mode (just comment out the sites element in servicedefintion.csdef). 

     

    Thursday, December 02, 2010 2:08 PM
  • This makes a lot of sense, and based on other threads this is why I moved my calls to Application_Start

    But, shouldn't InitializeCache work? I'm not even mounting the drive yet.  The UNSUPPORTED_OS exception is confusing me and coming up the "fix" is not obvious.

    So, I ask again ... what should I be doing here?


    - marc
    Thursday, December 02, 2010 5:58 PM
  • The workaround to use Azure Drives on dev fabric is to use IIS Hosted Web Core. You can do that by disabling full IIS mode by commenting out the sites element in the servicedefinition.csdef. Here's an example

    <!--

     

     

    <Sites>

    <Site name="Web">

    <Bindings>

    .....

    </Bindings>

    </Site>

    </Sites>

     

     

    -->

     

    Friday, December 03, 2010 11:50 PM
  • Ouch, so in dev fabric I have to switch back to HWC?  Are there any plans to fix this?

    And, thanks

    marc


    - marc
    Monday, December 06, 2010 4:59 AM