Skip to main content

DirectoryAccessRule.Allow(String[]) Method

Creates the DirectoryAccessRule that allows resource loading only from the file directories passed as the parameter.

Namespace: DevExpress.Security.Resources

Assembly: DevExpress.Data.v22.2.dll

NuGet Package: DevExpress.Data


public static DirectoryAccessRule Allow(
    params string[] directories


Name Type Description
directories String[]

An array of file directories that this rule allows. Other directories are considered as denied in this application.


Type Description

An instance of the DirectoryAccessRule class.


You can pass nothing as the method’s parameter to create a rule that allows access to all file directories:

// Image load from file directories is allowed

Pass the file directories that should be accessible in the application to allow resource loading only from them:

// Image load is allowed only from the specified file directories.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Allow(String[]) method.


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.

See Also