This method returns a fully qualified absolute server Url which includes the protocol, server, port in addition to the server relative Url. Works like Control.ResolveUrl including support for ~ syntax but returns an absolute URL.

Namespace: MonoSoftware.Web
Assembly: MonoSoftware.Web (in MonoSoftware.Web.dll) Version: 1.0.40.661 (1.0.40.661)

Syntax

C#
public static string ResolveServerUrl(
	string serverUrl,
	bool forceHttps
)
Visual Basic
Public Shared Function ResolveServerUrl ( 
	serverUrl As String,
	forceHttps As Boolean
) As String
Visual C++
public:
static String^ ResolveServerUrl(
	String^ serverUrl, 
	bool forceHttps
)
F#
static member ResolveServerUrl : 
        serverUrl : string * 
        forceHttps : bool -> string 

Parameters

serverUrl
Type: System..::..String
forceHttps
Type: System..::..Boolean
if true forces the url to use https

Return Value

Type: String

See Also