Skip to main content

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.v23.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
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")); 
See Also