Following is the inconsistent experience currently.
Scenario1
---------
I have the following route(NOTE: the route tokens are all in CAPS...more realistic scenario is when users say 'Controller'...note the capital 'C'):
config.Routes.MapHttpRoute("Default", "{controller}/{action}/{id}", new { CONTROLLER = "SampleTests", ACTION = "GetString1", id = RouteParameter.Optional });
When i make a request like this : "http://localhost:9090/", it properly delivers it to the "SampleTests" controller's "GetString1" action.
Scenario2
---------
I am trying to generate a link at an ApiController's action. The route through which i arrived at the action is:
"http://localhost:9090/SampleTests/GetString2"
Doing the following at the action(NOTE: the route tokens are all in CAPS):
Url.Link("Default", new { CONTROLLER = "Greetings", ACTION = "SayHello" });
Expected:"http://localhost:9090/Greetings/SayHello"
Actual :"http://localhost:9090/SampleTests/GetString2"
Observation: in the incoming path we are not considering the case-sensitiveness of the route tokens, but during Url Link generation we are.
Comments: Verified
Scenario1
---------
I have the following route(NOTE: the route tokens are all in CAPS...more realistic scenario is when users say 'Controller'...note the capital 'C'):
config.Routes.MapHttpRoute("Default", "{controller}/{action}/{id}", new { CONTROLLER = "SampleTests", ACTION = "GetString1", id = RouteParameter.Optional });
When i make a request like this : "http://localhost:9090/", it properly delivers it to the "SampleTests" controller's "GetString1" action.
Scenario2
---------
I am trying to generate a link at an ApiController's action. The route through which i arrived at the action is:
"http://localhost:9090/SampleTests/GetString2"
Doing the following at the action(NOTE: the route tokens are all in CAPS):
Url.Link("Default", new { CONTROLLER = "Greetings", ACTION = "SayHello" });
Expected:"http://localhost:9090/Greetings/SayHello"
Actual :"http://localhost:9090/SampleTests/GetString2"
Observation: in the incoming path we are not considering the case-sensitiveness of the route tokens, but during Url Link generation we are.
Comments: Verified