Running LightSpeed in Medium Trust
LightSpeed can be used in a medium trust environment, but requires some performance optimisations to be turned off, and some design conventions to be modified.
Specifically you will need to apply the following changes.
· Set LightSpeedContext.UseMediumTrustCompatibility to true. This is a static property and therefore applies to all LightSpeedContexts in the AppDomain (trust is set at an AppDomain level, so there would be no point allowing different trust levels on different contexts).
· If you are writing your model in code, declare special fields such as CreatedOn, and all fields in value objects, to be read-write instead of the normal read-only. (You should still not provide property setters for these fields: application code should still treat them as immutable.)
· If you are using the designer, set Medium Trust Compatibility to true on the model. This tells the designer to generate special fields and value object fields to be read-write instead of read-only.