-1

enter image description here

enter image description here

enter image description here

This action is not call in the browser! How to call this Controllers or Action?

  • 3
    Do you have registered the cxa path? If yes try to rename to CartHelperController instead of CartHelperControllers. Instead od screenshots, better to post code as code snippet in a question. – Tamás Tárnok Feb 13 at 7:03
  • 1
    Thank you for your comments.this question cost one day of me. – eric.luo Feb 13 at 7:26
2

Did you register your route correctly?

From MSDN:

routes.MapRoute(
  "Default",                                              // Route name
  "{controller}/{action}/{id}",                           // URL with parameters
   new { controller = "Home", action = "Index", id = "" }  // Parameter defaults
);

In Sitecore you want to register custom routes in the Initialize pipeline (from Sitecore Docs):

The safest and recommended way to add an MVC route is to add a processor in the Initialize pipeline, register the routes, and implement the route table in the RouteConfig class. This prevents you from inadvertently breaking any Sitecore routes.

Also (from MSDN):

Every controller name must end with the suffix Controller. For example, you can create a controller named ProductController but not a controller named Product.

Looks like you named it Controllers instead of Controller

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.