This topic has not yet been rated - Rate this topic

Secure Printing in Windows Forms

Visual Studio .NET 2003

Windows Forms applications often include printing abilities. The .NET Framework uses the PrintingPermission class to control access to printing capabilities and the associated PrintingPermissionLevel enumeration value to indicate the level of access. Printing is enabled by default in the Local Intranet and Internet zones; however, the level of access is restricted in both zones. Whether your application can print, requires user interaction, or cannot print depends upon the permission value granted to it. By default, the Local Intranet zone receives PrintingPermissionLevel.DefaultPrinting access and the Internet zone receives PrintingPermissionLevel.SafePrinting access.

The following table shows the functionality available at each printing permission level.

PrintingPermissionLevelDescription
AllPrintingProvides full access to all installed printers.
DefaultPrintingEnables programmatic printing to the default printer, along with safe printing through a restrictive printing dialog box. DefaultPrinting is a subset of AllPrinting
SafePrintingProvides printing only from a more-restricted dialog box. SafePrinting is a subset of DefaultPrinting.
NoPrintingPrevents access to printers. NoPrinting is a subset of SafePrinting.

See Also

Secure File and Data Access in Windows Forms | Additional Security Considerations in Windows Forms | Introduction to Security In Windows Forms | Windows Forms Security

Did you find this helpful?
(1500 characters remaining)