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.]
   NLog.LogManager.GetCurrentClassLogger() +100
   DynamicInjector3c03685c205943e19674b18b107aff11(Object[] ) +68
   Ninject.Activation.Context.Resolve() +245
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +228
   System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +201
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +77
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +246
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +90
   Ninject.Activation.Providers.StandardProvider.Create(IContext context) +716
   Ninject.Activation.Context.Resolve() +245
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +228
   System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +201
   Ninject.ResolutionExtensions.TryGet(IEnumerable`1 iterator) +60
   VeloTreePlanner.Web.Infrastructure.VeloTreeDependencyResolver.GetService(Type serviceType) +80
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +60

[InvalidOperationException: An error occurred when trying to create a controller of type 'VeloTreePlanner.Web.Controllers.HomeController'. Make sure that the controller has a parameterless public constructor.]
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +242
   System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +76
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +253
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +73
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1020
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +128


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