Tuesday, 15 March 2011

Azure Drive addressing using local emulated blob store -



Azure Drive addressing using local emulated blob store -

i unable simple tech demo working azure drive using locally hosted service running storage/compute emulator. not first azure project, first utilize of azure drive feature.

the code:

var localcache = roleenvironment.getlocalresource("myazuredrivecache"); clouddrive.initializecache(localcache.rootpath, localcache.maximumsizeinmegabytes); var creds = new storagecredentialsaccountandkey("devstoreaccount1", "eby8vdm02xnocqflquwjpllmetlcdxj1ouzft50usrz6ifsufq2uvercz4i6tq/k1szfptotr/kbhbeksogmgw=="); drive = new clouddrive(new uri("http://127.0.0.1:10000/devstoreaccount1/drive"), creds); drive.createifnotexist(16); drive.mount(0, drivemountoptions.none);

with local resource configuration:

localstorage name="myazuredrivecache" cleanonrolerecycle="false" sizeinmb="220000"

the exception:

uri http://127.0.0.1:10000/devstoreaccount1/drive invalid

information on how address local storage can found here: https://azure.microsoft.com/en-us/documentation/articles/storage-use-emulator/

i have used storage emulator ui create c:\users...\appdata\local\dftmp\wadd\devstoreaccount1 folder expect deed container in case.

however, next guidelines (as far can tell) , yet still receive exception. able identify doing wrong in case? had hoped able resolve using working sample else using clouddrive 127.0.0.1 or localhost unable find such on google.

i think have passed several required steps before mounting.

you have initialize local cache drive, , uri of page blob containing cloud drive before mounting it.

initializing cache:

// initialize local cache azure drive localresource cache = roleenvironment.getlocalresource("localdrivecache"); clouddrive.initializecache(cache.rootpath + "cache", cache.maximumsizeinmegabytes);

defining uri of page blob, made in configuration file:

// retrieve uri page blob contains cloud drive configuration settings string imagestorebloburi = roleenvironment.getconfigurationsettingvalue("< configuration name>");

azure

No comments:

Post a Comment