Visual Studio 2005 and Security
Visual Studio 2005 has a few features that cater to code access security. First, it allows developers of ClickOnce applications to specify the permissions required for their ClickOnce applications. Visual Studio 2005 can also estimate the security permissions required by an application. Most importantly, Visual Studio supports partial-trust debugging, thus significantly streamlining the process of developing secure yet usable modern applications.
Application assemblies (Console and Windows Forms applications) contain a Security tab in the project properties (see Figure 12-24). After checking the “Enable ClickOnce Security Settings” checkbox, you can configure the security permissions required by the application if it is to be deployed as a ClickOnce application. Two modes are available: full trust and partial trust. If you select “This is a full trust application”, the ClickOnce application manifest will demand the FullTrust permission set. If you select the “This is a partial trust application” radio button, you can also select three possible zones (or rather, permission sets) to associate with your ClickOnce application: Internet, Local Intranet, and Custom. ClickOnce security settings are actually enabled automatically the first time you publish an application as a ClickOnce application, and they default to full trust. The dialog lists almost all of the .NET security permissions.
Figure 12-24. Visual Studio 2005 project Security ...