Skip to main content
All docs
V25.2
  • ProcessStartPolicy.RestrictedProcessStartConfirmationEventArgs.AllowStart() Method

    Explicitly allows the process to start.

    Namespace: DevExpress.Data.Utils

    Assembly: DevExpress.Data.Desktop.v25.2.dll

    NuGet Packages: DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design

    Declaration

    public void AllowStart()

    Remarks

    Call the AllowStart method in a ConfirmationRequest event handler to approve execution and suppress the confirmation dialog.

    The following example enables the RequireConfirmation() policy at application startup and handles the ConfirmationRequest event to implement custom validation logic. The event handler allows only HTTPS URLs and blocks all other process start requests without displaying the confirmation dialog.

    using DevExpress.Data.Utils;
    
    internal static class Program {
        [STAThread]
        static void Main() {
          // Apply the RequireConfirmation policy.
            ProcessStartPolicy.RequireConfirmation();
    
            ProcessStartPolicy.ConfirmationRequest += ProcessStartPolicy_ConfirmationRequest;
    
            ApplicationConfiguration.Initialize();
            Application.Run(new Form1());
        }
    
        // Allow only HTTPS URLs.
        static void ProcessStartPolicy_ConfirmationRequest(object? sender, ProcessStartPolicy.RestrictedProcessStartConfirmationEventArgs e) {
            if (e.Uri != null)
                if (e.Uri.Scheme == Uri.UriSchemeHttps)
                    e.AllowStart();   // Safe URL — allow execution
                else
                    e.BlockStart();   // Non-HTTPS — block execution
        }
    }
    
    See Also