Validation Rules

Validation Rules management is access from Central Administration, and actually exists as a Custom SharePoint list in the Central Administration root web.

What is a validation rule?
Validation rules are basically rules that you can put in place to control whether the Sandbox Solutions in your farm will "Validate" or not.
What happens when a solution doesn't validate is up to you. You can choose to Enforce Validation or receive Email Notification.

Allow or Deny?
When you create a Validation Rule you can choose whether or not you want to "Allow" packages which match the rule to be Activated, or if you want to "Deny" (block) those solution packages.

What happens when a Validation Rule is matched?
It really depends on the other settings, but basically each Assembly and File in the package will be checked against both the Validation Rules you have created and also the Default Validation Behaviour specified in CKS: Sandbox - General Settings.

Default Validation Behaviour
This allows you to specify whether (by default) you want to "Allow All" or "Block All".
If you choose "Allow All" then the Sandbox Solution will only fail validation if it matches one of your "Deny" Validation Rules.
If you choose "Block All" then the Sandbox Solution will fail validation unless there are "Allow" Validation Rules in place that override the Default Validation Behaviour.

For example, lets say you set File Types to Block All but also create Validation Rules to Allow files of type XML, DLL and WebPart.
Every single file in each WSP package which is activated will be checked. If any files are detected that do not match one of the "Allowed" file types then it will fail validation.

What happens if a Sandbox Solution fails Validation?
It depends on the two settings:

Last edited Jul 16, 2011 at 11:45 PM by MartinHatch, version 3


No comments yet.