Pipeline
Pipeline

Reputation: 1059

CloudStorageAccount.Parse(connString) says CloudStorageAccount.cs not found

In my WebAPI controller I am trying to post to my Azure Blob Storage. I am trying to connect in the following manner:

string blobConnectionString = ConfigurationManager.ConnectionStrings["AzureStorageAccount"].ConnectionString;
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(blobConnectionString);
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobClient.GetContainerReference("testContainer");

However just doing this returns a 500 and walking through this line by line in the debugger after

CloudStorageAccount.Parse(blobConnectionString)

it returns a Source Not Found error in Visual Studio where it says:

CloudStorageAccount.cs not found, You need to find CloudStorageAccount.cs to view the source for the current call stack frame.

Is this a issue with me missing a file or is this a issue with my connection string? My web config is:

<connectionStrings>
<add name="AzureStorageAccount" connectionString="DefaultEndpointsProtocol=https;AccountName=somecustomname;AccountKey=accesskey" />
</connectionStrings>

Upvotes: 2

Views: 4406

Answers (1)

Pipeline
Pipeline

Reputation: 1059

The problem was me debugging using F11 (Step Into) rather than F10 (Step Over).

Upvotes: 1

Related Questions