UrlAccessRule.Deny(String[]) Method
Creates the UrlAccessRule that denies resource loading from the URLs passed as the parameter.
Namespace: DevExpress.Security.Resources
Assembly: DevExpress.Data.v25.2.dll
NuGet Package: DevExpress.Data
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| urls | String[] | An array of URLs that this rule denies. Other URLs are considered as allowed in this application. |
Returns
| Type | Description |
|---|---|
| UrlAccessRule | An instance of the UrlAccessRule class. |
Remarks
You can pass nothing as the method’s parameter to create a rule that denies access to all URLs:
// Image load from URLs is denied
DevExpress.Security.Resources.AccessSettings.StaticResources.SetRules(UrlAccessRule.Deny());
Pass the URLs that should not be accessible in the application to deny resource loading from them:
// Image load from the specified URL is denied. Images from other URLs are accessible.
DevExpress.Security.Resources.AccessSettings.StaticResources.SetRules(UrlAccessRule.Deny("http://mysite.dev"));
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Deny(String[]) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.