You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi I am trying to access Azure Blob from the sample C# Console Application (for Retrain Azure Machine Learning Models Programmatically) and ran into this problem.
I am wondering if this is caused by the version of Azure Portal (maybe the codes are meant to access the classic Azure portal as indicated by Microsoft DOCs), or is caused by the package Microsoft.WindowsAzure.Storage (referenced to :\Users\user\source\repos\ConsoleApp1\packages\WindowsAzure.Storage.8.7.0\lib\net45\Microsoft.WindowsAzure.Storage.dll)
I have installed both: PM> Install-Package Microsoft.AspNet.WebApi.Client and Install-Package WindowsAzure.Storage -Version 8.7.0
static void UploadFileToBlob(string inputFileLocation, string inputBlobName, string storageContainerName, string storageConnectionString)
{
// Make sure the file exists
if (!File.Exists(inputFileLocation))
{
throw new FileNotFoundException(
string.Format(
CultureInfo.InvariantCulture,
"File {0} doesn't exist on local computer.",
inputFileLocation));
}
Console.WriteLine("Uploading the input to blob storage...");
var blobClient = CloudStorageAccount.Parse(storageConnectionString).CreateCloudBlobClient();
var container = blobClient.GetContainerReference(storageContainerName);
container.CreateIfNotExists();
var blob = container.GetBlockBlobReference(inputBlobName);
blob.UploadFromFile(inputFileLocation, FileMode.Open);
}
Severity Code Description Project File Line Suppression State
Error CS1503 Argument 2: cannot convert from 'System.IO.FileMode' to 'Microsoft.WindowsAzure.Storage.AccessCondition' ConsoleApp1 C:\Users\user\source\repos\ConsoleApp1\ConsoleApp1\Program.cs 116 Active
Any help or clues appreciated.
The text was updated successfully, but these errors were encountered:
This project is simply a consumer of Azure Data Movement, like yourself. If you have a question about using it, you may want to ask on the actual project page.
Hi I am trying to access Azure Blob from the sample C# Console Application (for Retrain Azure Machine Learning Models Programmatically) and ran into this problem.
I am wondering if this is caused by the version of Azure Portal (maybe the codes are meant to access the classic Azure portal as indicated by Microsoft DOCs), or is caused by the package Microsoft.WindowsAzure.Storage (referenced to :\Users\user\source\repos\ConsoleApp1\packages\WindowsAzure.Storage.8.7.0\lib\net45\Microsoft.WindowsAzure.Storage.dll)
I have installed both: PM> Install-Package Microsoft.AspNet.WebApi.Client and Install-Package WindowsAzure.Storage -Version 8.7.0
static void UploadFileToBlob(string inputFileLocation, string inputBlobName, string storageContainerName, string storageConnectionString)
{
// Make sure the file exists
if (!File.Exists(inputFileLocation))
{
throw new FileNotFoundException(
string.Format(
CultureInfo.InvariantCulture,
"File {0} doesn't exist on local computer.",
inputFileLocation));
}
Severity Code Description Project File Line Suppression State
Error CS1503 Argument 2: cannot convert from 'System.IO.FileMode' to 'Microsoft.WindowsAzure.Storage.AccessCondition' ConsoleApp1 C:\Users\user\source\repos\ConsoleApp1\ConsoleApp1\Program.cs 116 Active
Any help or clues appreciated.
The text was updated successfully, but these errors were encountered: