Server Error in '/' Application.

Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

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:


[NullReferenceException: Object reference not set to an instance of an object.]
   ValehSchool.Web.Areas.admin.Controllers.FileManagerController..ctor() in D:\tfs\school\ValehSchool.Web\Areas\admin\Controllers\FileManagerController.cs:42
   lambda_method(Closure , Object[] ) +71
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +269

[DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor()' on type 'FileManagerController'.]
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +686
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +273
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget) +155

[DependencyResolutionException: An exception was thrown while activating ValehSchool.Web.Areas.admin.Controllers.FileManagerController.]
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters, Object& decoratorTarget) +630
   Autofac.Core.Resolving.InstanceLookup.Execute() +222
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request) +214
   Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest request) +125
   Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +189
   Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable`1 parameters) +70
   Autofac.Integration.Mvc.AutofacDependencyResolver.GetService(Type serviceType) +95
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +61

[InvalidOperationException: An error occurred when trying to create a controller of type 'ValehSchool.Web.Areas.admin.Controllers.FileManagerController'. Make sure that the controller has a parameterless public constructor.]
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +242
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +282
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +77
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1122
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +131


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