-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesinvestigate
Milestone
Description
From @benzhi2011 on Wednesday, 05 December 2018 15:00:37
IUrlHelper behave strange for new version of .net core 2.2
Helper method that is working for all early version
public static string AbsoluteRouteUrl(
this IUrlHelper url,
string routeName,
object routeValues = null)
{
return url.RouteUrl(routeName, routeValues, url.ActionContext.HttpContext.Request.Scheme);
}
string serviceUrl = Url.AbsoluteRouteUrl("default");about one line of code return the Url of the executing MVC controller, in my case here it should return DNS + /Login/SSO and this code has been working for .core 1.1 and 2.1
After I updated to 2.2 this serviceUrl return DNS + /Contact/SSO when I call it from Login controller method SSO. This is really weird.
Copied from original issue: dotnet/core#2107
YZahringer
Metadata
Metadata
Assignees
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesinvestigate