jquery - Ninject Activation Exception -


I am using asp.net mvc 3. I am using ninject 2.2.1.0

  Protected Zero application_Start () {// Hooks our DI stuff when Application SetupDependencyInjection () starts); } Public Zero SetupDependencyInjection () {// ASP.NET MVC 3 to use our Ninject DI Container Dependency Resolver.SetResolver (New NinjectDependencyResolver (CreateKernel ());} Secure IKernel CreateKernel () {var modules = new INinjectModule [ ] {extend new NhibernateModule (), a new service module (), a new repo module ()}; new standard return Col (modules);}   

the above is how I setup and Never have any problem with any of this unless I change my jquery UI tab into Ajax. A. Now I have the page load, then the first tab is called and the ajax requests. Many times I get the following error message that I do not. I am not sure why I get it am.

  error initializing _Page_Areas_Site_Views_Site_pDataTable_cshtml available Baining that more than one match I activation paths: 1) request for _Page_Areas_Site_Views_Site_pDataTable_cshtml tips: 1) Make sure you only once _Page_Areas_Site_Vi Ews_Site_pDataTable_cshtml has defined a binding   

I have not called the ninja to binding (I only do my repo and service layers), so it should be done on my own.

This can not work as a real answer, but I go to it anyway. I ran into the same problem, using MVC 2 and Ninject 2.0.

I was working on a PhotoController which only imposes images back to the page. This will be hit thirty or third times of the page request. I was using Ninject for dependency with all my controllers, and ran into problems with that specific controller.

Occasionally, Ninject will throw the exact type of activation exception you are facing. The only way to remove the error is to restart the app pool.

After the hour of difficulty around in an attempt to determine the cause and hours, only one conclusion I came to be Ninject is a problem in dependencies injection in cases where the same example There is a large number of requests for . The difference between was different from this photo controller and any other in the project.

I solved the problem by switching to using a generic handler, and shortly after, preset BLOB Storage URL.

Sorry, I can not help much, but I never got the resolution for this.

Comments