I just switched my website over to Medium Trust to check if there were any issues, and I got a pretty nasty exception which I traced to my setting the Skin property on some RadChart instances. The partial stack trace follows:
Telerik.Charting.Styles.SkinnablePropertyAttribute..ctor()
---> System.MethodAccessException:
Telerik.Charting.Styles.SkinnablePropertyAttribute..ctor() --->
System.Security.SecurityException: Request failed.
at
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly
asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle
rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object
assemblyOrString, PermissionSet granted, PermissionSet refused,
RuntimeMethodHandle rmh, SecurityAction action, Object demand,
IPermission permThatFailed)
at
System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet
grants, PermissionSet refused, PermissionSet demands,
RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction
action, Boolean throwException)
at System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet
demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle
rmh)
at System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset,
RuntimeMethodHandle rmh)
at System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags,
PermissionSet grantSet)
at System.Threading.CompressedStack.DemandFlagsOrGrantSet(Int32 flags,
PermissionSet grantSet)
at
System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32
permission, PermissionSet targetGrant, CompressedStack securityContext)
at
System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32
permission, PermissionSet targetGrant)
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.PermissionSet
--- End of inner exception stack trace ---
at System.Reflection.MethodBase.PerformSecurityCheck(Object obj,
RuntimeMethodHandle method, IntPtr parent, UInt32 invocationFlags)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags
invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.ComponentModel.AttributeCollection.GetDefaultAttribute(Type
attributeType)
at System.ComponentModel.AttributeCollection.get_Item(Type
attributeType)
at Telerik.Charting.Styles.StyleSerializer.Deserialize(XmlElement
rootElement, Object styleContainer)
at
Telerik.Charting.Styles.StyleSerializer.DeserializeProperty(PropertyDescriptor
propDescriptor, XmlElement propElement, Object styleContainer)
at Telerik.Charting.Styles.StyleSerializer.Deserialize(XmlElement
rootElement, Object styleContainer)
at
Telerik.Charting.Styles.StyleSerializer.DeserializeProperty(PropertyDescriptor
propDescriptor, XmlElement propElement, Object styleContainer)
at Telerik.Charting.Styles.StyleSerializer.Deserialize(XmlElement
rootElement, Object styleContainer)
at
Telerik.Charting.Styles.StyleSerializer.DeserializeProperty(PropertyDescriptor
propDescriptor, XmlElement propElement, Object styleContainer)
at Telerik.Charting.Styles.StyleSerializer.Deserialize(XmlElement
rootElement, Object styleContainer)
at Telerik.Charting.Chart.LoadSkin(Object skinContainer, TextWriter
text)
at Telerik.Charting.Chart.ApplySkin(String skinName)
at Telerik.Charting.Chart.set_Skin(String value)
If I removed the Skin="Telerik" from the markup, it works fine. If I run the site in Full Trust, it works fine. Is this a known issue, are there any workarounds or fixes?
Thanks,