corelibraries-devexpress-dot-data-dot-asyncdownloadpolicy-dot-registertrusteduri-x28-system-dot-uri-x29.md
Trusts the specified resource.
Namespace : DevExpress.Data
Assembly : DevExpress.Data.v25.2.dll
NuGet Package : DevExpress.Data
public static void RegisterTrustedUri(
Uri uri
)
Public Shared Sub RegisterTrustedUri(
uri As Uri
)
| Name | Type | Description |
|---|---|---|
| uri | Uri |
The trusted resource.
|
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());
}
Shared Sub Main()
DevExpress.Data.AsyncDownloadPolicy.SuppressAll()
DevExpress.Data.AsyncDownloadPolicy.RegisterTrustedUri(New Uri("https://www.devexpress.com"))
Application.Run(New Form1())
End Sub
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