Same answer as MattMitchell’s but with some modification.
This checks for the default port instead.
Edit: Updated syntax and using
Request.Url.Authority
as suggested
$"{Request.Url.Scheme}{System.Uri.SchemeDelimiter}{Request.Url.Authority}"
Same answer as MattMitchell’s but with some modification.
This checks for the default port instead.
Edit: Updated syntax and using
Request.Url.Authority
as suggested
$"{Request.Url.Scheme}{System.Uri.SchemeDelimiter}{Request.Url.Authority}"