Difference between RouteTable.Routes and HttpConfiguration.Routes?

I wonder why routes seem to be customizable from both the HttpConfiguration object and the RouteTable class? Obviously, the two .Routes properties are not of the same type, but they seem to remain in sync. Is there any chance they can get out of sync? I'm interested, however, in terms of web APIs, should I use RouteTable.Routes?

+4
source share
1 answer

The HttpConfiguration class HttpConfiguration specific to WebApi, which makes it reusable outside of IIS (for example, for self-hosting). The RouteTable version is for IIS only.

+6
source

Source: https://habr.com/ru/post/1435529/


All Articles