Microsoft.WindowsAzure.Storage.StorageException: The underlying connection was closed
We suddenly encountered the error shown below. From looking at the stack trace it looks like the site was not able to connect to the container. I checked it in Azure but the container is showing as healthy for the past week, which covers the date of the error in the log. Thoughts anyone? Thanks.
2018-07-16 01:41:13,906 [P13036/D2/T1] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.WindowsAzure.Storage.StorageException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: The read operation failed, see inner exception. ---> System.InvalidProgramException: Common Language Runtime detected an invalid program.
at System.Net.SSPISecureChannelType.DecryptMessage(SafeDeleteContext context, SecurityBufferDescriptor inputOutput, UInt32 sequenceNumber)
at System.Net.SSPIWrapper.EncryptDecryptHelper(OP op, SSPIInterface SecModule, SafeDeleteContext context, SecurityBuffer[] input, UInt32 sequenceNumber)
at System.Net.Security.SecureChannel.Decrypt(Byte[] payload, Int32& offset, Int32& count)
at System.Net.Security._SslStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
--- End of inner exception stack trace ---
at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
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 695
--- 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.CloudBlobContainer.Create(BlobContainerPublicAccessType accessType, BlobRequestOptions requestOptions, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobContainer.cs:line 68
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.CreateIfNotExists(BlobContainerPublicAccessType accessType, BlobRequestOptions requestOptions, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobContainer.cs:line 233
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.CreateIfNotExists(BlobRequestOptions requestOptions, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Blob\CloudBlobContainer.cs:line 196
at Our.Umbraco.FileSystemProviders.Azure.AzureFileSystem.CreateContainer(CloudBlobClient cloudBlobClient, String containerName, BlobContainerPublicAccessType accessType)
at Our.Umbraco.FileSystemProviders.Azure.AzureFileSystem..ctor(String containerName, String rootUrl, String connectionString, Int32 maxDays, Boolean useDefaultRoute, BlobContainerPublicAccessType accessType)
at Our.Umbraco.FileSystemProviders.Azure.AzureFileSystem.GetInstance(String containerName, String rootUrl, String connectionString, String maxDays, String useDefaultRoute, String usePrivateContainer)
at Our.Umbraco.FileSystemProviders.Azure.AzureBlobFileSystem..ctor(String containerName, String rootUrl, String connectionString, String maxDays, String useDefaultRoute)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Umbraco.Core.IO.FileSystemProviderManager.GetUnderlyingFileSystemNoCache(String alias, Func`1 fallback)
at Umbraco.Core.IO.FileSystemProviderManager.<>c__DisplayClass56_0`1.<GetFileSystemProvider>b__0(String _)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Umbraco.Core.IO.FileSystemProviderManager.GetFileSystemProvider[TFileSystem](Func`1 fallback)
at Umbraco.Core.IO.FileSystemProviderManager.CreateWellKnownFileSystems()
at Umbraco.Core.IO.FileSystemProviderManager..ctor()
at Umbraco.Core.IO.FileSystemProviderManager.get_Current()
at Umbraco.Core.Services.MediaService..ctor(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory, IDataTypeService dataTypeService, IUserService userService)
at Umbraco.Core.Services.ServiceContext.<>c__DisplayClass34_0.<BuildServiceCache>b__12()
at System.Lazy`1.CreateValue()
--- End of stack trace from previous location where exception was thrown ---
at System.Lazy`1.get_Value()
at Umbraco.Web.Models.Mapping.MediaModelMapper.<>c__DisplayClass0_0.<ConfigureMappings>b__9(IMemberConfigurationExpression`1 expression)
at AutoMapper.MappingExpression`2.ForDestinationMember(IMemberAccessor destinationProperty, Action`1 memberOptions) in c:\dev\AutoMapper\src\AutoMapper\Internal\MappingExpression.cs:line 542
at AutoMapper.MappingExpression`2.ForMember(Expression`1 destinationMember, Action`1 memberOptions) in c:\dev\AutoMapper\src\AutoMapper\Internal\MappingExpression.cs:line 183
at Umbraco.Web.Models.Mapping.MediaModelMapper.ConfigureMappings(IConfiguration config, ApplicationContext applicationContext)
at Umbraco.Core.CoreBootManager.<InitializeModelMappers>b__32_0(IConfiguration configuration)
at AutoMapper.Mapper.Initialize(Action`1 action) in c:\dev\AutoMapper\src\AutoMapper\Mapper.cs:line 237
at Umbraco.Core.CoreBootManager.InitializeModelMappers()
at Umbraco.Core.CoreBootManager.Initialize()
at Umbraco.Web.WebBootManager.Initialize()
at Umbraco.Core.UmbracoApplicationBase.StartApplication(Object sender, EventArgs e)
at Umbraco.Core.UmbracoApplicationBase.Application_Start(Object sender, EventArgs e)
Microsoft.WindowsAzure.Storage.StorageException: The underlying connection was closed
We suddenly encountered the error shown below. From looking at the stack trace it looks like the site was not able to connect to the container. I checked it in Azure but the container is showing as healthy for the past week, which covers the date of the error in the log. Thoughts anyone? Thanks.
Did you resolve this? Im getting the same issue after disabling TLS 1.0 & 1.1
In the upcoming v1.1.0-beta release I've added support to specify TLS version for connections https://github.com/JimBobSquarePants/UmbracoFileSystemProviders.Azure/pull/122
is working on a reply...