title: Create Azure Storage Account using C# Throw exception "The request was aborted: Could not create SSL/TLS secure channel."
body: <p>I have a method in my asp.net mvc 5 application that uses Microsoft Azure client classes (CloudContext.Clients) to create StorageManagementClient. Needs certificate to authenticate, so I created a selfsigned certificate.</p>
  
  <p>On development machine everything works ok. </p>
  
  <p>On azure virtual machine(windows server 2008 r2) I have imported the certificate which is found by the code as expected, but when code that creates StorageManagementClient executes an exception is thrown </p>
  
  <blockquote>
    <p>Inner Exception Type: System.Net.WebException
    Inner Exception: The request was aborted: Could not create SSL/TLS secure channel.
    Inner Source: System
    Inner Stack Trace: 
       at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext&amp; context)
       at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
    Exception Type: System.Net.Http.HttpRequestException
    Exception: An error occurred while sending the request.
    Source: test
    Stack Trace: 
       at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at Microsoft.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
       at Microsoft.WindowsAzure.StorageAccountOperationsExtensions.Create(IStorageAccountOperations operations, StorageAccountCreateParameters parameters)
       at ApplicationPortal.Code.DeployAzureResources.CreateStorageAccount(SubscriptionCloudCredentials credentials, String storageName) in C:\Users\DEVSYS1\Documents\Visual Studio 2017\Projects\PaSeaPortal\ApplicationPortal\Code\DeployAzureResources.cs:line 106
       at ApplicationPortal.Controllers.AccountController.d__21.MoveNext() in C:\Users\DEVSYS1\Documents\Visual Studio 2017\Projects\PaSeaPortal\ApplicationPortal\Controllers\AccountController.cs:line 355</p>
  </blockquote>
  
  <p>And on Event Viewer I am seeing this Error "The following fatal alert was generated: 80. The internal error state is 301."</p>