title: Microsoft.WindowsAzure.Storage.StorageException: The operation has timed out
body: <p>I have something like the following code</p>
  
  <pre><code>using Microsoft.WindowsAzure.Storage;
  using Microsoft.WindowsAzure.Storage.Blob;
  private void DownloadFile(CloudBlockBlob blobref , string fileName)
  {
   blobref.DownloadToFile( fileName, FileMode.Create);
  }
  </code></pre>
  
  <p>It works most of the time</p>
  
  <p>Then one day the following error occurs</p>
  
  <pre><code>Microsoft.WindowsAzure.Storage.StorageException: The operation has timed out. ---&gt; System.TimeoutException: The operation has timed out.
     at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 693
     --- End of inner exception stack trace ---
     at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 604
     at Microsoft.WindowsAzure.Storage.Blob.CloudBlob.DownloadToStream(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlob.cs:line 235
     at Microsoft.WindowsAzure.Storage.Blob.CloudBlob.DownloadToFile(String path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext) 
  </code></pre>
  
  <p>The solution seems to be to re-generate the Storage Key</p>
  
  <p>Is there a way to prevent this happening?</p>