Click here to Skip to main content
15,867,568 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: checkbox problem Pin
richardqiaolixin18-Aug-10 16:30
richardqiaolixin18-Aug-10 16:30 
AnswerRe: checkbox problem Pin
Rajendra Prasad Panchati18-Aug-10 19:27
Rajendra Prasad Panchati18-Aug-10 19:27 
GeneralRe: checkbox problem Pin
Dhyanga19-Aug-10 3:42
Dhyanga19-Aug-10 3:42 
QuestionHow do I authenticate that username,password or smtpserver is wrong in mail smpt server Pin
Samarjeet Singh@india17-Aug-10 22:49
Samarjeet Singh@india17-Aug-10 22:49 
AnswerRe: How do I authenticate that username,password or smtpserver is wrong in mail smpt server Pin
Not Active18-Aug-10 2:10
mentorNot Active18-Aug-10 2:10 
AnswerRe: How do I authenticate that username,password or smtpserver is wrong in mail smpt server Pin
T M Gray18-Aug-10 10:25
T M Gray18-Aug-10 10:25 
AnswerRe: How do I authenticate that username,password or smtpserver is wrong in mail smpt server Pin
Rajendra Prasad Panchati18-Aug-10 19:36
Rajendra Prasad Panchati18-Aug-10 19:36 
QuestionNinject and MVC2(Please help) Pin
future383917-Aug-10 20:00
future383917-Aug-10 20:00 
Hi,
firstly, sorry if I post it for 2nd times. because its a week I stuck in this problem
I am trying to build up my knowledge regarding ASP.Net and new things which I read from books. Frankly, its few days I got this error. after running my code I see this error
<br />
No matching bindings are available, and the type is not self-bindable. Activation path: 2) Injection of dependency CommunityUserRepository into parameter _rep of constructor of type AccountController 1) Request for AccountController <br />



it is the source 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;
using SportsStore.Domain.Abstract;
using System.Configuration;
using SportsStore.Domain.Concrete;

namespace SportsStore.WebUI.Infrastructure
{
    public class NinjectControllerFactory : DefaultControllerFactory
    {
        // A Ninject "kernel" is the thing that can supply object instances
        private IKernel Kernel = new StandardKernel(new SportsStoreServices());


        // ASP.NET MVC calls this to get the controller for each request
        protected override IController GetControllerInstance(RequestContext context,Type controllerType)
        {
            //if (controllerType == null)
            //    return null;
            //return (IController)Kernel.Get(controllerType);

            return controllerType == null ? null
                                         : (IController)Kernel.Get(controllerType);
        }

        // Configures how abstract service types are mapped to concrete implementations
        private class SportsStoreServices : StandardModule
        {
            public override void Load()
            {
                //registered any IProductsRepository with the DI container.
                Bind<IProductRepository>().To<SqlProductRepository>().WithConstructorArgument
                    ("connectionString", ConfigurationManager.ConnectionStrings["AppDb"].ConnectionString);
                
            }
        }
    }
}



error occure in this line
<br />
protected override IController GetControllerInstance(RequestContext context,Type controllerType)<br />
{<br />
//if (controllerType == null)<br />
// return null;<br />
//return (IController)Kernel.Get(controllerType);<br />
return controllerType == null ? null<br />
: (IController)Kernel.Get(controllerType); <br />
<br />

Could you please help me?
AnswerRe: Ninject and MVC2(Please help) Pin
michaelschmitt17-Aug-10 23:29
michaelschmitt17-Aug-10 23:29 
AnswerRe: Ninject and MVC2(Please help) Pin
shinewu3659-Mar-11 15:54
shinewu3659-Mar-11 15:54 
Questionupdate date and time in asp.net Pin
Ahamed Azeem17-Aug-10 19:59
Ahamed Azeem17-Aug-10 19:59 
AnswerRe: update date and time in asp.net Pin
raju melveetilpurayil17-Aug-10 21:52
professionalraju melveetilpurayil17-Aug-10 21:52 
AnswerUse a Modify date in your table Pin
David Mujica18-Aug-10 3:27
David Mujica18-Aug-10 3:27 
AnswerRe: update date and time in asp.net Pin
Rajendra Prasad Panchati18-Aug-10 19:47
Rajendra Prasad Panchati18-Aug-10 19:47 
QuestionAjax with Asp Dot Net Pin
anishkannan17-Aug-10 19:47
anishkannan17-Aug-10 19:47 
AnswerRe: Ajax with Asp Dot Net Pin
Eaverae17-Aug-10 20:43
Eaverae17-Aug-10 20:43 
AnswerRe: Ajax with Asp Dot Net Pin
raju melveetilpurayil17-Aug-10 20:48
professionalraju melveetilpurayil17-Aug-10 20:48 
Questionconvert hex to image Pin
meenu s17-Aug-10 19:14
meenu s17-Aug-10 19:14 
AnswerRe: convert hex to image Pin
raju melveetilpurayil17-Aug-10 21:28
professionalraju melveetilpurayil17-Aug-10 21:28 
Questionimage did not show up Pin
Dhyanga17-Aug-10 6:15
Dhyanga17-Aug-10 6:15 
AnswerRe: image did not show up Pin
Not Active17-Aug-10 6:28
mentorNot Active17-Aug-10 6:28 
GeneralRe: image did not show up Pin
Dhyanga17-Aug-10 7:05
Dhyanga17-Aug-10 7:05 
GeneralRe: image did not show up Pin
raju melveetilpurayil17-Aug-10 8:14
professionalraju melveetilpurayil17-Aug-10 8:14 
GeneralRe: image did not show up Pin
Dhyanga17-Aug-10 9:17
Dhyanga17-Aug-10 9:17 
GeneralRe: image did not show up Pin
raju melveetilpurayil17-Aug-10 10:10
professionalraju melveetilpurayil17-Aug-10 10:10 

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.