-Fixed full trust permission check in non .NET 4.0 builds
This commit is contained in:
@@ -408,7 +408,15 @@ namespace Newtonsoft.Json.Serialization
|
|||||||
|
|
||||||
_fullyTrusted = appDomain.IsHomogenous && appDomain.IsFullyTrusted;
|
_fullyTrusted = appDomain.IsHomogenous && appDomain.IsFullyTrusted;
|
||||||
#else
|
#else
|
||||||
_fullyTrusted = true;
|
try
|
||||||
|
{
|
||||||
|
new SecurityPermission(PermissionState.Unrestricted).Demand();
|
||||||
|
_fullyTrusted = true;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
_fullyTrusted = false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user