EnvironmentPermission

In a .NET Windows Forms application, you must have minimal “Read” EnvironmentPermission settings if your application uses the GetContextKeywords function. The default setting is “Unrestricted=’true’” when the EnvironmentPermission check box is selected on the Security tab of the Project painter, although you can change this to “Read” and still use the GeContextKeywords function. If you modify the setting to “Write” or “NoAccess”, GetContextKeywords will fail.

Table A-1: EnvironmentPermission required in Windows Forms

System function

Permission required

GetContextKeywords

Read

Example

You can customize the EnvironmentPermission setting to allow the use of the GetContextKeywords function in XML, as shown below:

<IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" 
Read="Path " />