Skip to main content
All docs
V23.2

AsyncDownloadPolicy.RegisterTrustedUri(Uri) Method

Trusts the specified resource.

Namespace: DevExpress.Data

Assembly: DevExpress.Data.v23.2.dll

NuGet Package: DevExpress.Data

Declaration

public static void RegisterTrustedUri(
    Uri uri
)

Parameters

Name Type Description
uri Uri

The trusted resource.

Remarks

If a restrictive download policy is active, use the RegisterTrustedUri method to create a “safe” resource whitelist. Downloads from whitelist resources bypass policy restrictions.

static void Main() {
    DevExpress.Data.AsyncDownloadPolicy.SuppressAll();
    DevExpress.Data.AsyncDownloadPolicy.RegisterTrustedUri(new Uri("https://www.devexpress.com"));
    Application.Run(new Form1());  
}

Note

Masked resource registration is not available. If you need to validate various requests made to the same host, apply the SuppressAll() policy and handle the Downloading event to manually inspect each connection/resource.

Read the following topic for detailed information and examples: Suppress Control Requests to Download Data from External URLs.

See Also