-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sequence contains no elements - Bootstrapper #24
Comments
This means that the DataAnnotationsModelValidatorProvider is removed by someother library or you use App_Start and derive from NinjectHttpApplication at the same time. |
How do I find out / fix if DataAnnotationsModelValidatorProvider was removed? |
If I remember correctly this can occur if you derive from Have you verified that you don't derive from NinjectWebApplication? 2012/11/19 Saulo Vallory [email protected]
|
Yes. That's why I asked about the DataAnnotationsModelValidatorProvider removed thing :/ Couldn't solve the issue, so I uninstalled Ninject and started adding todo's where I'm hard coding the instantiation to deal with this later. Any help will be much appreciated! |
Found the problem! I have tree projects in my solution (Domain, Infra and UI). I accidentally installed Ninject in two of them (infra and UI) which created two |
@svallory thank you for the update! This helped me |
The easiest solution is to delete the NinjectWebCommon.cs class created under the App_Start directory and allow the MvcApplication inheriting from NinjectHttpApplication to let Ninject take care of calling your NinjectModule modules where you register your bindings. |
@svallory just passing by to thanks. I'm actually new to Ninject and was getting this Exception while loading my application. Removed duplicated NinjectWebCommon class and worked! ;) |
@svallory This was Helpfull Thanks ^^. |
System.Linq.Enumerable.Single(IEnumerable`1 source) +379
Ninject.Web.Mvc.NinjectMvcHttpApplicationPlugin.Start() in c:\Projects\Ninject\ninject.web.mvc\mvc3\src\Ninject.Web.Mvc\NinjectMvcHttpApplicationPlugin.cs:53
I cannot seem to get this up and running. I've followed the instructions to the letter..
nothing changed in global I'm using the App_Start folder
[assembly: WebActivator.PreApplicationStartMethod(typeof(EFWebApp.Web.App_Start.NinjectWebCommon), "Start")]
[assembly: WebActivator.ApplicationShutdownMethodAttribute(typeof(EFWebApp.Web.App_Start.NinjectWebCommon), "Stop")]
namespace EFWebApp.Web.App_Start
{
using System;
using System.Web;
}
The text was updated successfully, but these errors were encountered: