Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
97 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 ...
0
votes
2answers
123 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] ...
0
votes
2answers
130 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 ...
1
vote
1answer
137 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 ...
2
votes
1answer
118 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, ...
0
votes
1answer
2k views

Sitecore WebApi custom route not working controller not found

Controller: public class ExampleController : Controller { private readonly ISitecoreContext _sitecoreContext; public ExampleController () { } [System.Web.Http.HttpGet] ...
7
votes
2answers
1k 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 ...
4
votes
1answer
419 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 ...
4
votes
3answers
2k 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 ...
3
votes
1answer
728 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 ...
0
votes
2answers
367 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 ...
4
votes
2answers
222 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 ...
3
votes
2answers
359 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/...
4
votes
2answers
574 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 ...
3
votes
1answer
49 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 ...
6
votes
1answer
548 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/...
3
votes
1answer
276 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 ...
0
votes
1answer
307 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 ...
4
votes
0answers
630 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 ...
10
votes
1answer
4k 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 ...
3
votes
0answers
453 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 ...
7
votes
2answers
1k 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 ...
5
votes
4answers
4k 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: ...