Expand Minimize

SPC020611: Do not define 'FileIOPermission' with 'Unrestricted=true'

The CAS Policy for System.Security.Permissions.FileIOPermission with setting 'Unrestricted=true' is not allowed. This means read and write permission to all locations on the SharePoint system. Limit the permission to certain folders, e.g. TEMP.

CheckId SPC020611
TypeName DoNotDefineUnrestrictedFileIOPermission
Severity Error
Type PermissionSet

Remove permission 'FileIOPermission' with setting 'Unrestricted=true'.
Bad Practice

<Solution xmlns="http://schemas.microsoft.com/sharepoint/">
  <CodeAccessSecurity>
    <PolicyItem>
      <PermissionSet class="NamedPermissionSet" version="1">
      ...
        <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=Neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="True" />
      ...
      </PermissionSet>
    <PolicyItem>
  <CodeAccessSecurity>
</Solution>

Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of RENCORE AB. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.