Sets resource access rules. Raises an exception if this method is called for the second time while the application is running.
public void SetRules( params IAccessRule rules )
Public Sub SetRules( ParamArray rules As IAccessRule() )
An array of access rules.
Before you set access rules, specify the resources for which these rules should be checked. To do this, use one of the following static properties:
The SetRules(IAccessRule) method can be called only once while the application is running. This allows rules to not be overridden. An attempt to call this method for the second time leads to an exception. So, call this method when your application starts to specify rules before a control (for example, Web End-User ReportDesigner) sets its rules. Alternatively, use the TrySetRules(IAccessRule) method. It does not raise an exception, but returns false if a control sets rules earlier.