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?