Server Error in '/' Application.

An existing connection was forcibly closed by the remote host

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.Win32Exception: An existing connection was forcibly closed by the remote host

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[Win32Exception (0x80004005): An existing connection was forcibly closed by the remote host]

[SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - An existing connection was forcibly closed by the remote host.)]
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1338
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +159
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +382
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +307
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +198
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +422
   System.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellationToken) +611
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   System.Data.Entity.SqlServer.<<ExecuteAsync>b__0>d.MoveNext() +286
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   System.Data.Entity.SqlServer.<ExecuteAsyncImplementation>d__6`1.MoveNext() +287

[EntityException: An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy.]
   System.Data.Entity.SqlServer.<ExecuteAsyncImplementation>d__6`1.MoveNext() +468
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   System.Data.Entity.Core.EntityClient.<OpenAsync>d__56.MoveNext() +775

[EntityException: The underlying provider failed on Open.]
   System.Data.Entity.Core.EntityClient.<OpenAsync>d__56.MoveNext() +1068
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   System.Data.Entity.Core.Objects.<EnsureConnectionAsync>d__107.MoveNext() +505
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   System.Data.Entity.Core.Objects.<ExecuteInTransactionAsync>d__156`1.MoveNext() +294
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   System.Data.Entity.SqlServer.<ExecuteAsyncImplementation>d__6`1.MoveNext() +314

[EntityException: An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy.]
   System.Data.Entity.SqlServer.<ExecuteAsyncImplementation>d__6`1.MoveNext() +537
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   System.Data.Entity.Utilities.CultureAwaiter`1.GetResult() +43
   System.Data.Entity.Core.Objects.<GetResultsAsync>d__43.MoveNext() +613
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   System.Data.Entity.Utilities.CultureAwaiter`1.GetResult() +43
   System.Data.Entity.Internal.<FirstMoveNextAsync>d__9.MoveNext() +303
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   System.Data.Entity.Infrastructure.<ForEachAsync>d__2`1.MoveNext() +363
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   Stedentrips.DAL.Repositories.<GetAllForUserAsync>d__1.MoveNext() in C:\AzureBuildAgent\_work\3\s\Stedentrips\900.Stedentrips.DAL\Repositories\FavouriteHotelsRepository.cs:22
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   Stedentrips.BLL.Services.<GetFavouriteHotelsIdsAsync>d__11.MoveNext() in C:\AzureBuildAgent\_work\3\s\Stedentrips\900.Stedentrips.BLL\Services\FavouriteHotelsService.cs:92
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +68
   Stedentrips.Core.Helpers.AsyncHelper.RunSync(Func`1 func) +158
   Stedentrips.Web.App.ViewModels.Home.LayoutViewModel.Initialize(RouteValueDictionary routeData) +800
   lambda_method(Closure , Object[] ) +72
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() in C:\projects\autofac\src\Autofac\Core\Activators\Reflection\ConstructorParameterBinding.cs:128

[DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor()' on type 'ErrorController'.]
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() in C:\projects\autofac\src\Autofac\Core\Activators\Reflection\ConstructorParameterBinding.cs:136
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac\Core\Activators\Reflection\ReflectionActivator.cs:120
   Autofac.Core.Resolving.InstanceLookup.CreateInstance(IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac\Core\Resolving\InstanceLookup.cs:135

[DependencyResolutionException: An exception was thrown while activating Stedentrips.Web.App.Controllers.ErrorController.]
   Autofac.Core.Resolving.InstanceLookup.CreateInstance(IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac\Core\Resolving\InstanceLookup.cs:149
   Autofac.Core.Resolving.InstanceLookup.Execute() in C:\projects\autofac\src\Autofac\Core\Resolving\InstanceLookup.cs:91
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) in C:\projects\autofac\src\Autofac\Core\Resolving\ResolveOperation.cs:125
   Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest request) in C:\projects\autofac\src\Autofac\Core\Resolving\ResolveOperation.cs:87
   Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) in C:\projects\autofac\src\Autofac\ResolutionExtensions.cs:1070
   Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable`1 parameters) in C:\projects\autofac\src\Autofac\ResolutionExtensions.cs:835
   Autofac.Integration.Mvc.AutofacDependencyResolver.GetService(Type serviceType) +75
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +64

[InvalidOperationException: An error occurred when trying to create a controller of type 'Stedentrips.Web.App.Controllers.ErrorController'. Make sure that the controller has a parameterless public constructor.]
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +245
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +265
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +77
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1128
   System.Web.<>c__DisplayClass285_0.<ExecuteStepImpl>b__0() +41
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +155
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +134


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0