Progress® Telerik® Reporting R3 2018

ReportViewerEnsureAbsoluteUri Method

Determines whether the given Uri is absolute. If not, creates a new absolute Uri based on the combination of Source for the current application and the given relative URI.

Namespace:  Telerik.ReportViewer.Silverlight
Assembly:  Telerik.ReportViewer.Silverlight (in Telerik.ReportViewer.Silverlight.dll) Version: R3 2018 SP2


public static Uri EnsureAbsoluteUri(
	Uri uri


Type: SystemUri
The Uri that is being checked.

Return Value

Type: Uri
An absolute Uri.


If the URI is absolute, the same instance is returned.

If the URI is relative, a new absolute Uri based on the combination of Source of the current application and the given relative URI is created. The Source usually points to the application package (XAP).


The following example shows some common scenarios and the absolute Uris returned. Consider that the Source Uri points to http://mydomain/MyWebSite/ClientBin/MyApp.xap:
//Absolute Uri (no change):
EnsureAbsoluteUri(new Uri("http://mydomain/MyWebSite/ReportService.svc", UriKind.Absolute));    // http://mydomain/MyWebSite/ReportService.svc
//Relative Uris:
EnsureAbsoluteUri(new Uri("ReportService.svc", UriKind.Relative)); // http://mydomain/MyWebSite/ClientBin/ReportService.svc
EnsureAbsoluteUri(new Uri("../ReportService.svc", UriKind.Relative)); // http://mydomain/MyWebSite/ReportService.svc 
EnsureAbsoluteUri(new Uri("/ReportService.svc", UriKind.Relative)); // http://mydomain/ReportService.svc

See Also

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article