Asynchronous technique becomes important when dealing with cloud resources or accessing object in long distance network route.
Latency could blocking the application UI for sometimes if there are any big resources processed synchronously.
Microsoft Windows Azure Storage is one of best options to store Blob, File, Queue, Document Table and also SQL databases.
Other well known and could considered as best cloud storage options are Amazon S3, Google but this post will be focused on Azure since the source code is built for Azure storage.
The source code in this post is available for download at below url:
The demonstration application is a Visual Basic .Net WinForm. This app upload and download image file from/to Azure Blob storage asynchronously.
It also has Cancel to Async thread and List of uploaded files. Below is the Form’s design
Posted in ASP .Net, Cloud, Visual Basic .Net
Tagged Azure, Azure Blob Storage, Azure Storage Emulator, CreateIfNotExistsAsync, DownloadToStreamAsync, Task Async Await, Upload Download List Files Asynchronously, UploadFromFileAsync, VB .Net, VB. Net Cancel Async, Visual Basic
This post gives examples to use async and await in order to process something asynchronously.
Examples will be presented as Console App, Win Form and Asp.Net Web App.
Taking a definition reference of Async & Await from https://msdn.microsoft.com/en-us/library/hh191443(v=vs.120).aspx :
You can avoid performance bottlenecks and enhance the overall responsiveness of your application by using asynchronous programming. However, traditional techniques for writing asynchronous applications can be complicated, making them difficult to write, debug, and maintain.
Visual Studio 2012 introduces a simplified approach, async programming, that leverages asynchronous support in the .NET Framework 4.5 and the Windows Runtime.
The compiler does the difficult work that the developer used to do, and your application retains a logical structure that resembles synchronous code.
As a result, you get all the advantages of asynchronous programming with a fraction of the effort.
Posted in ASP .Net, C#
Tagged .Net, ASP, ASP. Net, Async Await, Async Await Example, C#, C# async await console app, C# async await web, C# async await winform, C# asynchronous, C# Task