UrlAccessRule.Deny(String[]) Method
In This Article
Creates the UrlAccessRule that denies resource loading from the URLs passed as the parameter.
Namespace: DevExpress.Security.Resources
Assembly: DevExpress.Data.v24.2.dll
NuGet Package: DevExpress.Data
#Declaration
public static UrlAccessRule Deny(
params string[] urls
)
#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 |
---|---|
Url |
An instance of the Url |
#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"));
See Also