I am using asp.net mvc 3. I am using ninject 2.2.1.0
protected void Application_Start()
{
// Hook our DI stuff when application starts
SetupDependencyInjection();
}
public void SetupDependencyInjection()
{
// Tell ASP.NET MVC 3 to use our Ninject DI Container
DependencyResolver.SetResolver(new NinjectDependencyResolver(CreateKernel()));
}
protected IKernel CreateKernel()
{
var modules = new INinjectModule[]
{
new NhibernateModule(),
new ServiceModule(),
new RepoModule()
};
return new StandardKernel(modules);
}
The above is how I setup and I never had a problem with any of it until I changed my jquery ui tabs to ajax.
Now I have the page load then the first tab gets called and does an ajax request. Some times I get the following error message other times I don't. I am not sure why I am getting it.
Error activating _Page_Areas_Site_Views_Site_pDataTable_cshtml
More than one matching bindings are available.
Activation path:
1) Request for _Page_Areas_Site_Views_Site_pDataTable_cshtml
Suggestions:
1) Ensure that you have defined a binding for _Page_Areas_Site_Views_Site_pDataTable_cshtml only once.
I never told ninject to do binding(I only do my repos and service layers) so it must be doing it on it's own.