SaaS CMS has officially launched! Learn more now.

The routed data is of type..and the binding context data ... is of type ..., neither of which matches the requested type...


Hi Folks,

getting an error with an ecommerce project. Anytime I try to navigate to a catalog item I get this error.  The 'requested type' is always AccessoryProduct in spite of whatever class of item I am actually trying to access. 

Strangely enough this seems to coincide with the alphabetical listing of the catalog classes.  The erroneous requested type was always 'FashionNode', then I noticed it changed to BlouseProduct when that was added.  I added a WatchProduct and AccessoryProduct as a test and noticed it had changed to always requesting an AccessoryProduct.

I've looked around for a solution and the problem has usually seemed to be the classes loaded into the controller, but they all seem to be correct and matching with the right views.

Has anyone one come across this one before?

Many thanks,


Mar 09, 2021 9:54

CatalogueControllerBase is Custom Controller base? Is it inherited from CatalogContentBase?

Did you implement custom routing for the catalogue in Commerce Initialization?

Mar 09, 2021 20:07

CatalogControllerBase is a custom controller yeah, inheriting from ContentController. 

That's all my routing code here, I think it's fairly standard unless I've missed something.

using System.Web.Mvc;
using System.Web.Routing;
using EPiServer.Commerce.Routing;
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.ServiceLocation;

namespace CommerceTraining.Infrastructure
    public class EPiServerCommerceInitializationModule : IConfigurableModule
        public void Initialize(InitializationEngine context)
            CatalogRouteHelper.MapDefaultHierarchialRouter(RouteTable.Routes, false);

        public void Preload(string[] parameters) { }

        public void Uninitialize(InitializationEngine context)

        public void ConfigureContainer(ServiceConfigurationContext context)
            DependencyResolver.SetResolver(new StructureMapDependencyResolver(context.StructureMap()));
Mar 10, 2021 9:35


As a thought, shouldn't your CatalogControllerBase inherit ContentController<T> rather than ContentController<CatalogContentBase>? Like this:

public class CatalogControllerBase<T> : ContentController<T> where T : CatalogContentBase
    //Controller code goes here...

By having all of your controllers ultimately inheriting ContentController<CatalogContentBase>, I'd imagine Episerver will see that as a bunch of controllers which handle CatalogContentBase rather than your specific catalog content types.

Mar 10, 2021 14:29
Quan Mai - Mar 11, 2021 10:51
Good call Paul :)

Do you have any custom router? 

Mar 10, 2021 16:24

It seems like the problem is with the base controller. I tried your controller and I got the same error. 

Example If you want to create One base controller for all catalogue pages 

If you want a Base controller for categories only (Nodes)

public class NodeControllerBase<T> : ContentController<T> where T : NodeContentBase
Mar 11, 2021 0:16

Thanks guys, yep the problem was in the CatalogControllerBase. Switched it out to;

public class CatalogControllerBase<T> : ContentController<T> where T : CatalogContentBase

and it works perfectly now.

Mar 11, 2021 9:30
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.