Skip to main content
A newer version of this page is available. .

UrlAccessSecurityLevelSetting.SecurityLevel Property

OBSOLETE

Use the DevExpress.Security.Resources.AccessSettings.StaticResources.TrySetRules method instead.

Specifies whether a report control allows loading images using the “file://“ protocol.

Namespace: DevExpress.Utils

Assembly: DevExpress.Data.v19.2.dll

Declaration

[Obsolete("Use the DevExpress.Security.Resources.AccessSettings.StaticResources.TrySetRules method instead.")]
public static UrlAccessSecurityLevel SecurityLevel { get; set; }

Property Value

Type Description
UrlAccessSecurityLevel

A UrlAccessSecurityLevel enumeration value.

Available values:

Name Description
Restricted
WebUrlsOnly

Forbids loading images using the “file://“ protocol (only the “http://“, “https://“ and “ftp://“ protocols are supported).

FilesFromBaseDirectory

Enables loading of images from an application’s working directory (defined by the AppDomain.CurrentDomain.BaseDirectory property).

FilesFromDirectories
Custom

Enables loading of images from custom directories (defined using the UrlAccessSecurityLevelSetting.RegisterCustomBaseDirectories or UrlAccessSecurityLevelSetting.RegisterCustomCallback method).

Unrestricted

Enables loading of any image from any directory.

Remarks

The XRPictureBox.ImageUrl property of the XRPictureBox report control does not accept the “file://“ protocol by default to prevent unauthorized access to images on the server (e.g., BMP, PNG and JPG files). The same applies to the XRRichText report control when images are added using the IncludePicture field. For security reasons, both these controls only support the “http://“, “https://“ and “ftp://“ protocols by default.

To enable using the “file://“ protocol for loading images, use the corresponding methods (UrlAccessSecurityLevelSetting.RegisterCustomBaseDirectories and UrlAccessSecurityLevelSetting.RegisterCustomCallback) or set the SecurityLevel property to one of the following UrlAccessSecurityLevel enumeration values.

See Also