Skip to main content
4 votes
Accepted

How to set default controller for an area

You need to register the Area. So, create a registration area under the path /Areas/MyTools/. You can name it MyToolRegistrationArea.cs. In the MyToolRegistrationArea.cs, add the following ...
Hishaam Namooya's user avatar
3 votes

How to add custom route in Angular JSS ? Domain/<Page>/<id>

I achieved this using wildcard-item in sitecore. I created like below, Below list of working urls. http://a-custom-route.com/articledetail/id1 http://a-custom-route.com/articledetail/id2 Note: ...
Andi AR's user avatar
  • 763
3 votes
Accepted

Sitecore WebApi custom route not working controller not found

Your route pipeline definition should be changed to this one: public class RegisterTestApiRoute { public virtual void Process(PipelineArgs args) { RouteTable.Routes.MapRoute( ...
Peter Procházka's user avatar
2 votes
Accepted

Adding sitemap.xml custom route causes EnsureLoggedInForPreview.Process

I had to explicitly allow xml files using the Sitecore FilterUrlExtensions setting: <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> <sitecore> <pipelines> ...
Ethan Schofer's user avatar
2 votes
Accepted

Requested document not found when using MVC routes

The code below is code I reuse constantly. The only caveat is that is the controller is in a different project/library than the route initialization code, strange thing happen. I always keep the ...
Chris Auer's user avatar
  • 13.1k
1 vote

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

You can: Create custom Contoller Factory overriding SitecoreControllerFactory class. Register custom factory in Sitecore ( https://doc.sitecore.com/xp/en/developers/103/sitecore-experience-manager/...
Marek Musielak's user avatar
  • 23.9k
1 vote
Accepted

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

You need to define separate routes for entries like that: routes.MapRoute( name: "routeNameVirtualFolder", url: "{virtualFolder}/api/ContrrolerName/ActionName", ...
Marek Musielak's user avatar
  • 23.9k
1 vote

Custom route for wild card

You can use IIS Rewrite inbound rules to accomplish this, for example: <rule name="Property URL Rewrite" stopProcessing="true"> <match url="^new/Brand-([0-9]+)/...
Cristi Vulturar's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible