The HttpRequest class in Asp.Net 5 (vNext) contains (amongst other things) parsed details about the URL for the request, such as Scheme, Host
HttpRequest
Scheme
Host
In .NET Core razor:
@using Microsoft.AspNetCore.Http.Extensions @Context.Request.GetEncodedUrl() //Use for any purpose (encoded for safe automation)
You can also use instead of the second line:
@Context.Request.GetDisplayUrl() //Use to display the URL only