Progress® Telerik® Reporting R3 2021

ReportViewer.EnsureAbsoluteUri 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 2021


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

Version Information

Supported in: 1.0

See Also

In this article
Not finding the help you need?