Monday 18 July 2011

Writing to Azure Local Storage

You will need to modify ServiceDefinition.csdef add the following lines

<LocalResources>
<LocalStorage name="LocalTempFolder" cleanOnRoleRecycle="false" sizeInMB="5" />
</LocalResources>

and then you can access the path this way in your code

Dim localResource As LocalResource = RoleEnvironment.GetLocalResource("LocalTempFolder")
Dim pathToReadWriteFolder = localResource.RootPath

No comments:

Post a Comment