title: ASP.NET MVC 3 deployment error
body: <p>When I run my ASP.NET MVC 3 application with the Ninject it works perfectly, but when I deploy it onto an IIS, it gives this error:</p>
  
  <blockquote>
    <p></p>
  </blockquote>
  
  <pre><code>[NullReferenceException: Object reference not set to an instance of an object.]
     Betolto.Controllers.DataInputController..ctor() +47
     DynamicInjector7922fd15a4fb4caba8ffb4cc7f18cbcf(Object[] ) +42
     Ninject.Activation.Providers.StandardProvider.Create(IContext context) +489
     Ninject.Activation.Context.Resolve() +177
     Ninject.&lt;&gt;c__DisplayClass10.&lt;Resolve&gt;b__c(IBinding binding) +30
     System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +151
     System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +4222965
     Ninject.Web.Mvc.NinjectDependencyResolver.GetService(Type serviceType) +64
     System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +51
  &gt;
  [InvalidOperationException: An error occurred when trying to create a controller of type 'Betolto.Controllers.DataInputController'. Make sure that the controller has a parameterless public constructor.]
     System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +182
     System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(RequestContext requestContext, Type controllerType) +80
     System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +74
     System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController&amp; controller, IControllerFactory&amp; factory) +232
     System.Web.Mvc.&lt;&gt;c__DisplayClass6.&lt;BeginProcessRequest&gt;b__2() +49
     System.Web.Mvc.&lt;&gt;c__DisplayClassb`1.&lt;ProcessInApplicationTrust&gt;b__a() +13
     System.Web.Mvc.SecurityUtil.&lt;GetCallInAppTrustThunk&gt;b__0(Action f) +7
     System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
     System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Func`1 func) +124
     System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +98
     System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +50
     System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
     System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8969412
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +184
  </code></pre>
  
  <p>I've searched through the internet but I've not found the solution to my problem.
  I thank for all answers.</p>