
permission = new InteropPermission(InteropKind::ClrInterop);
permission.assert();
//Setting connection
storageCredentials = new Microsoft.Azure.Storage.Auth.StorageCredentials(vendParameters.bbsAzureStorageAcntName, vendParameters.bbsAzureStorageAcntPw);
storageAccount = new Microsoft.Azure.Storage.CloudStorageAccount(storageCredentials, true);
fileClient = storageAccount.CreateCloudFileClient();
fileShare = fileClient.GetShareReference(_agentShareName);
if (!fileShare.Exists(null, null))
{
warning(' Fileshare does not exist, creating...');
fileShare.CreateIfNotExists(null, null);
Info(' Fileshare create attempted. Checking...');
Counter i = 0;
while (!fileShare.Exists(null, null) && i < 60)
{
sleep(1000);
i++;
}
if (fileShare.Exists(null, null))
{
Info(strfmt('File share created after %1s',i));
}
else {
error('Fileshare could not be created');
}
}
Exception has been thrown by the target of an invocation
The specified resource does not exist.