title: MONO 3.0.2 + Ninject + MVC4: Sequence contains no matching element
body: <p>I am using VS2012 RC and created a MVC4 app in .NET 4.0 mode. I use Ninject + Ninject.MVC3 as a DI container. It works on my development machine on Windows and on another machine with .NET 4.0 installed, but when I deploy it on a Linux server with Mono 3.0.2, XSP and fastcgi + lighttpd I just get a Ninject related error message:</p>
  
  <pre><code>System.InvalidOperationException
  Sequence contains no matching element
  
    at System.Linq.Enumerable.Single[DataAnnotationsModelValidatorProvider] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback) [0x00000] in &lt;filename unknown&gt;:0 
    at System.Linq.Enumerable.Single[DataAnnotationsModelValidatorProvider] (IEnumerable`1 source) [0x00000] in &lt;filename unknown&gt;:0 
    at Ninject.Web.Mvc.NinjectMvcHttpApplicationPlugin.Start () [0x00000] in &lt;filename unknown&gt;:0 
    at Ninject.Web.Common.Bootstrapper.&lt;Initialize&gt;b__0 (INinjectHttpApplicationPlugin c) [0x00000] in &lt;filename unknown&gt;:0 
    at Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map[INinjectHttpApplicationPlugin] (IEnumerable`1 series, System.Action`1 action) [0x00000] in &lt;filename unknown&gt;:0 
    at Ninject.Web.Common.Bootstrapper.Initialize (System.Func`1 createKernelCallback) [0x00000] in &lt;filename unknown&gt;:0 
    at MvcApplication1.App_Start.NinjectWebCommon.Start () [0x00000] in &lt;filename unknown&gt;:0 
    at MvcApplication1.MvcApplication.Application_Start () [0x00000] in &lt;filename unknown&gt;:0 
  </code></pre>
  
  <p>To clarify: I had to manually call the Start and Stop methods of the generated NinjectWebCommon class, because the <code>[assembly: WebActivator.PreApplicationStartMethod...]</code> attribute gets ignored (I first got error messages regarding missing default constructors, which are normal for a DI-ed controller)</p>
  
  <p>I also tried subclassing NinjectHttpApplication, but I got the same error.</p>
  
  <p>Any help here?</p>