Skip to main content

Questions tagged [routing]

For questions related to the creation of custom or use of default routes in Sitecore, covering routing for MVC and WebAPI, in addition to ReactJS routing, etc.

Filter by
Sorted by
Tagged with
4 votes
1 answer
29 views

What options are available to handle the dynamic routes in Sitecore and Next.js?

What options are available to handle the dynamic pages in Sitecore and Next.js? Let's say we have created a page called "devpage" and we have the dynamic routes like this devpage/{dynamic ...
Lahiru Lanka Rathnayaka's user avatar
0 votes
2 answers
86 views

Custom MVC Routing in Sitecore does not read Sitecore context language

I am trying to create custom routing for multiple languages. Created processor like below image. Problem is that it does not give exact context language but gives "en" as language name. Can ...
Rashmi Ranjan's user avatar
1 vote
2 answers
93 views

HTTP 500 errors when accessing custom route which can't find a controller

Every time somebody tries to access a route "below" our custom API routes, we see an HTTP 500 error. Such errors are quite messy in our log, and we would like to convert it into 404 errors ...
pwind's user avatar
  • 973
0 votes
0 answers
184 views

Base URL is not coming correctly in AJAX call on landing page of sub site

My current Sitecore project has a multisite with URL structure as follows www.MainSite.com www.MainSite.com/SubSite Whenever I do an AJAX call from the subsite landing page the base URL is coming as ...
shahul's user avatar
  • 67
0 votes
1 answer
44 views

{virtualFolder} in route config is not taking full path defined on the site defnition file

My current Sitecore(9.0.2) project have multisite implementation with URL structure as follows Url: www.MainSite.com virtual folder:/ Url: www.MainSite.com/SubSite virtual folder:/SubSite Url: www....
shahul's user avatar
  • 67
1 vote
1 answer
2k views

Sitecore custom api routing is not working

We have a multi-site environment. In one of the module, we are calling the same controller/action from all the sites. Perhaps, the same Javascript file which calls this controller/action is ...
PaRsH's user avatar
  • 159
0 votes
2 answers
2k views

Redirect URL A to URL B

I want to redirect one URL to the another. Suppose, I have 2 URLs www.abc.com/home/gateway [Item for /gateway is not created in sitecore] www.xyz.com/newgateway.php [This is not a Sitecore Webpage] ...
PSS's user avatar
  • 607
1 vote
2 answers
3k views

Troubleshooting Sitecore Identity Server routing errors in Sitecore 9

I am upgrading Sitecore 8.1 to 9.1. After resolving a number of config and dll-related errors, if I try to reach /sitecore I get redirected to /identity/login/shell/SitecoreIdentityServer Which ...
Emanuele Ciriachi's user avatar
1 vote
1 answer
498 views

JSS LayoutService decoupled from Routing in Angular

Is it possible to decouple the use of the LayoutService from all of the Routing code and use it independently? We are upgrading an AngularJS application to Angular and have incorporated JSS but are ...
Toby Nunn's user avatar
2 votes
1 answer
825 views

Requested document not found when using MVC routes

I am getting 404s (requested document not found) when I try to use a custom route I created per the guide here: https://kb.sitecore.net/articles/700677. My patch config is showing up in showconfig, ...
Paul's user avatar
  • 555
1 vote
1 answer
6k views

Sitecore WebApi custom route not working controller not found

Controller: public class ExampleController : Controller { private readonly ISitecoreContext _sitecoreContext; public ExampleController () { } [System.Web.Http....
nari447's user avatar
  • 447
7 votes
2 answers
5k views

A route named x is already in the route collection. Route names must be unique

EXM is throwing error when I go to the dashboard. I see the following error in the Sitecore log file. Exception System.ArgumentException: A route named 'CountriesV1' is already in the route ...
Himadri Chakrabarti's user avatar
4 votes
1 answer
996 views

Sitecore MVC Routing and Virtual Folders

I have a multi-site Sitecore instance with several sites defined using the physicalFolder/virtualFolder attributes defined on the <site> nodes all done with MVC. There is some functionality I ...
vandsh's user avatar
  • 1,651
4 votes
3 answers
3k views

ServiceApiController Method not found when using HttpPost and ComplexType (Sitecore 8.1.3)

I am working on refactoring some code and want to create WebApi services to do so. I have created an initialization pipeline that registers custom routes. I am still able to follow base sitecore ssc ...
Derek Port's user avatar
3 votes
1 answer
1k views

How to have a custom url for a listing page

I am unable to figure out the correct route configuration for this scenario. The tree structure is as: Home |_Articles |_Topic1 |_Blogs |_blog1 |_blog2 |_Topic2 Each topic ...
sukesh's user avatar
  • 3,250
1 vote
2 answers
701 views

I need to integrate a controller from a compiled dll into a controller I can build/control. How can I call that as a rendering?

I'm able to call this compiled dll's controller directly in a Sitecore rendering - e.g. I can create a rendering where I reference the controller, controller action, and area and the content from the ...
Amy Triplett's user avatar
5 votes
2 answers
350 views

EntityService-based controllers stop working when adding a controller with a named route

ASP.NET Web API 2 allows to set route name on a controller: Route names are useful for generating links, so that you can include a link in an HTTP response. I define two controllers, each of them ...
Serhii Shushliapin's user avatar
3 votes
2 answers
831 views

Redirect requests based on missing data on wildcard item

I have a URL, myWebsite.com/locations, and currently if you go to myWebsite.com/locations/{any valid ID} you get a page with content about the location. However, if you go to myWebsite.com/locations/...
Andrew Diamond's user avatar
4 votes
2 answers
875 views

How do I remove /sitecore from API calls?

A client I'm working with has an internal API built that they use for search purposes, now API URLs are being built like this: website/internal-api/sitecore/controller/method My Question is if there ...
Muradious's user avatar
  • 531
3 votes
1 answer
62 views

wo url serving default.aspx

i've setup various rewrite rules within sitecore using the url rewrite module. for some really bizarre reason /wo refuses to work, and browsing to /wo on other Sitecore sites I've worked on appears to ...
David Buckell's user avatar
5 votes
1 answer
1k views

How to pass dynamic parameters to a Sitecore page via the URI?

On our website we have a page which is accessible via a path like: www.example.com/statistics We would like this page to show different content based on the URI, e.g. www.example.com/statistics/...
user avatar
4 votes
1 answer
417 views

Html.Sitecore().Controller on a CD - No route in the route table matches the supplied values

I am having a similar problem to InvalidOperationException: No route in the route table matches the supplied values That is, I am getting the error: No route in the route table matches the ...
Ethan Schofer's user avatar
0 votes
1 answer
488 views

MVC Routing with Language Variant in Sitecore

I have MVC Routing issue in Sitecore. I have the following route in myRegisterRoutes() method. For this method I need to add language variant since I have enabled language fallback. Could some please ...
Sai Charan Medavarapu's user avatar
4 votes
0 answers
927 views

How to ignore routes from specific dlls in Sitecore 8.2 [closed]

Sitecore 8.2 update 1. I have added few dll refences in project. The DLLs are from external application and have their own webapi controllers and routes. I am using Autofac and excluding the ...
sc.kautilya's user avatar
11 votes
1 answer
7k views

InvalidOperationException: No route in the route table matches the supplied values

I've recently deployed a SC 8.1 update 3 site to production (seperate CM and CD) and on the CD side I'm getting this error: Server Error in '/' Application. No route in the route table matches the ...
Marc's user avatar
  • 213
3 votes
0 answers
562 views

Custom route for MVC controller in a market place package is not working

I am working on a marketplace package that services some analytics data via MVC controllers. But when testing I am finding several implementations of DI that cause my route to fail on the site. One ...
Chris Auer's user avatar
  • 13.2k
7 votes
2 answers
2k views

Error when using custom routes with https: "Attempt to retrieve context object of type 'Sitecore.Mvc.Presentation.RenderingContext' from empty stack."

We have a login/register modal that is being called via javascript on the front end. I created a custom route to point to the right action controller, and it works fine in every environment - except ...
Amy Triplett's user avatar
5 votes
4 answers
6k views

Passing a parameter to controller rendering through URL

I have a component on my page that is a controller rendering and I'd like to pass a parameter in through the URL, but not as a query string parameter. So, instead of site.com/product?id=123, I want: ...
LonghornTaco's user avatar
  • 2,536