Azure Blob Storage MVC smaple RRS feed

  • Question

  • I was following along with this sample project sample article and in the code to upload the blob which in my case was a simple text file I get this error :

    "ReadTimeout = 'fileStream.ReadTimeout' threw an exception of type 'System.InvalidOperationException'"

    in this code:

    private CloudBlobContainer GetCloudBlobContainer()
                CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
                CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
                CloudBlobContainer container = blobClient.GetContainerReference("test-blob-container");
                return container;
    public string UploadBlob()
                CloudBlobContainer container = GetCloudBlobContainer();
                CloudBlockBlob blob = container.GetBlockBlobReference("myBlob");
                using (var fileStream = System.IO.File.OpenRead(@"c:\Test\sample.txt"))
                return "success!";
    I'm not sure how to narrow down the problem here.  Can someone assist me in direction to take? 

    Thursday, August 2, 2018 10:36 PM

All replies

  • Hi Mimosa Arts,

    This forum discusses and asks questions about the C# programming language, since your issue is more related to asp.net MVC, I would suggest that you could post your issue on asp.net MVC forum for suitable support.


    Thanks for your understanding and cooperation.

    Best regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, August 3, 2018 2:21 AM