1

i try to inject membership provider using ninject, but i get some error when i running mw project..

System.InvalidOperationException: Sequence contains no elements

Line 30:             DynamicModuleUtility.RegisterModule(typeof(OnePerRequestHttpModule));
Line 31:             DynamicModuleUtility.RegisterModule(typeof(NinjectHttpModule));
Line 32:             bootstrapper.Initialize(CreateKernel);
Line 33:         }
Line 34:         

can some one tell me, how i can solve my error?

novian kristianto
  • 751
  • 3
  • 12
  • 34

1 Answers1

0

I struggled with this error only to discover that another project in the solution had also added a NinjectWebCommon.cs file to its AppStart directory, essentially responsible for duplicating the creation of the kernal object. Once I eliminated that duplication, the application was fine.

David
  • 79
  • 1
  • 1