Click here to Skip to main content
15,887,336 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionFtp size Pin
moein.serpico13-Aug-10 20:54
moein.serpico13-Aug-10 20:54 
AnswerRe: Ftp size Pin
T M Gray16-Aug-10 6:37
T M Gray16-Aug-10 6:37 
GeneralRe: Ftp size Pin
moein.serpico17-Aug-10 2:02
moein.serpico17-Aug-10 2:02 
GeneralRe: Ftp size Pin
T M Gray17-Aug-10 5:08
T M Gray17-Aug-10 5:08 
GeneralRe: Ftp size Pin
moein.serpico17-Aug-10 19:28
moein.serpico17-Aug-10 19:28 
QuestionDependency Injection Pin
future383913-Aug-10 20:36
future383913-Aug-10 20:36 
AnswerRe: Dependency Injection Pin
Not Active14-Aug-10 4:20
mentorNot Active14-Aug-10 4:20 
GeneralRe: Dependency Injection Pin
future383915-Aug-10 15:37
future383915-Aug-10 15:37 
Hello every1, I went through some article and do realize the DI. the problem is during developing face with the following error.Could you please help me,guys?

it is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Ninject.Core;
using SportsStore;
using SportsStore.WebUI.Controllers;
using System.Web.Routing;
using Ninject.Modules;
using Ninject.Core.Modules;

namespace SportsStore.WebUI.Infrastructure
{
    public class NinjectControllerFactory : DefaultControllerFactory
    {
 
        private IKernel Kernel = new StandardKernel(new SportsStoreServices());


        protected override IController GetControllerInstance(RequestContext context,Type controllerType)
        {
            if (controllerType == null)
                return null;
            return (IController) kernel.Get(controllerType);
        }


        private class SportsStoreServices : NinjectModule
        {
            public override void Load()
            {
               
            }
        }
    }
}


Error occurs in this line:
private IKernel Kernel = new StandardKernel(new SportsStoreServices());



this is the error
<br />
The best overloaded method match for 'Ninject.Core.StandardKernel.StandardKernel<br />
(Ninject.Core.KernelOptions, params Ninject.Core.IModule[])' has some invalid arguments	

GeneralRe: Dependency Injection Pin
Not Active15-Aug-10 16:02
mentorNot Active15-Aug-10 16:02 
GeneralRe: Dependency Injection Pin
future383915-Aug-10 17:14
future383915-Aug-10 17:14 
Question<%: Pin
DoctorMick13-Aug-10 2:23
DoctorMick13-Aug-10 2:23 
AnswerRe: <%: Pin
Arun Jacob13-Aug-10 2:30
Arun Jacob13-Aug-10 2:30 
QuestionRefresh grid usuing jquery Pin
amit_8312-Aug-10 21:13
professionalamit_8312-Aug-10 21:13 
AnswerRe: Refresh grid usuing jquery Pin
Viral Upadhyay12-Aug-10 22:52
Viral Upadhyay12-Aug-10 22:52 
AnswerRe: Refresh grid usuing jquery Pin
T M Gray13-Aug-10 10:05
T M Gray13-Aug-10 10:05 
GeneralRe: Refresh grid usuing jquery Pin
raju melveetilpurayil13-Aug-10 19:39
professionalraju melveetilpurayil13-Aug-10 19:39 
QuestionVery slow loading web page Pin
AndyASPVB12-Aug-10 10:26
AndyASPVB12-Aug-10 10:26 
AnswerRe: Very slow loading web page Pin
T M Gray12-Aug-10 12:01
T M Gray12-Aug-10 12:01 
AnswerRe: Very slow loading web page Pin
Rajendra Prasad Panchati17-Aug-10 20:56
Rajendra Prasad Panchati17-Aug-10 20:56 
QuestionCollapsible Panel Extender (cpe) Issue Pin
swjam12-Aug-10 2:50
swjam12-Aug-10 2:50 
AnswerRe: Collapsible Panel Extender (cpe) Issue Pin
T M Gray12-Aug-10 11:47
T M Gray12-Aug-10 11:47 
Questionsend mail with format Pin
padmanabhan N11-Aug-10 23:54
padmanabhan N11-Aug-10 23:54 
AnswerRe: send mail with format Pin
JHizzle12-Aug-10 0:18
JHizzle12-Aug-10 0:18 
AnswerRe: send mail with format Pin
Sneha Bisht12-Aug-10 2:01
Sneha Bisht12-Aug-10 2:01 
GeneralRe: send mail with format Pin
padmanabhan N12-Aug-10 2:58
padmanabhan N12-Aug-10 2:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.