Home Microsoft Azure .NET SDK Sync on Async
 I am using the Azure Blob Storage SDK Microsoft.WindowsAzure.Storage for my ASP.NET application. I have seen some synchronous method calling asynchronous method. They use an helper method named RunWithoutSynchronizationContext from Microsoft.WindowsAzure.Storage.Core.Util. The code is basically doing something like  SynchronizationContext current = SynchronizationContext.Current; try { SynchronizationContext.SetSynchronizationContext((SynchronizationContext) null); methodAsync().Wait(); } finally { SynchronizationContext.SetSynchronizationContext(current); }  I was just wondering if this is a way to avoid deadlock in .NET Framework when blocking on asynchronous code? If not, then what is it the purpose of this method?