c# - Add client name in custom routing -
i want add client name in each , every route in .net core application. not want add in each controller using route or routeprefix. should available controllers. so,how can ?
lets have following routes
mysite.com/virtualdir1/clientname/login
mysite.com/virtualdir1/clientname/dashboard
mysite.com/virtualdir1/clientname/home
mysite.com/virtualdir1/clientname/aboutus
i have tried setup in startup.cs file follows gives 404 error
app.usemvc(routes => { routes.maproute( name: "backend", template: "{clientname}/{controller=home}/{action=login}"); });
thanks !
Comments
Post a Comment