יום שלישי 10 יולי 2012 03:31
I use a piece of code as follows to unmount all previously mounted drives when an ASP.NET application starts.
The code lies in Application_Start function, copied from a quite common example.
var mapping = CloudDrive.GetMountedDrives();
foreach (var drive in mapping)
string paq = drive.Value.PathAndQuery;
var mountedDrive = account.CreateCloudDrive(paq);
The problem is that the PathAndQuery kept in the string paq begins with the account name and the CreateCloudDrive method adds the account name again to the mountedDrive.Uri.
For example, if the account name is "devsotreaccount1" and the string paq got is "/devstoreaccount1/mydrives/SamplePictures.vhd", after the CreateCloudDrive method the Uri property of mountedDrive becomes "http://xxxx/devsotreaccount1//devsotreaccount1/xxxx", which causes an exception and makes the unmounting fail.
Since the example code can be found almost everywhere on the Internet, i can hardly believe it's wrong. Although the problem is easy to fix by manually modifying the paq string, i don't understand why this happens to me. Is there any method prepared for such situation?
יום שלישי 10 יולי 2012 08:08Do you want to use Local Storage for Drive? As far as i know, it's not support.
יום שלישי 10 יולי 2012 09:45Storage Emulator implements blobs as .VHD folders in somewhere in local machine. It was the emulator in use when the problem occurred.
יום חמישי 19 יולי 2012 16:39I am experiencing the same issue. To be clear, it is just a problem with the local emulator?