This is based on the answer here to a similar question.
My code looks like this:
string url = Url.Action("Details", "Home", new RouteValueDictionary(new { Area = "MyArea", id = Id }), HttpContext.Request.Url.Scheme, HttpContext.Request.Url.Authority);
However, the resulting url contains double port number like this:
http://localhost:54383:54383/MyArea/Home/Details/1
The url should be:
http://localhost:54383/MyArea/Home/Details/1