0

RouteTable.Routes.Remove(RouteTable.Routes["test-page"])

the above mentioned RouteTable is not working in .NetCore 6.0

Is this any alternate available to remove the item from RouteTable?

  • you have to provide little bit more context around this code. is it some action method, or middleware or anywhere else ? – CodingMytra Jul 26 '22 at 09:12
  • in .net4.5 using this RouteTable ( System.web namesapce ) to remove the routes from route collection . DotNet core this RouteTable method is not available . how can i remove the routes from Route collection . – Gnanasekar Kasthuri Jul 27 '22 at 10:08
  • You mentioned .net core in question. now you are telling .net4.5, please clearly specify your environment, is it a framework or core application ? you won't find exact match but you if you share what is your scenario then we might suggest how it can be achieved in .NET core – CodingMytra Jul 27 '22 at 10:10
  • Did [this link](https://stackoverflow.com/questions/32565768/change-route-collection-of-mvc6-after-startup) help you? – Chen Jul 27 '22 at 10:25

0 Answers0