I know that Entity Framework supports Partial trust, I personally blogged about that
It was working fine, I tested it and it was fine. Now if you download the samples attached to my post about the subject, it doesn't run under default partial trust anymore!!!
When I dug into System.Data.Entity assembly using reflector on the position of failure "System.Data.Objects.LightweightCodeGenerator.ValidateSetterProperty(RuntimeMethodHandle setterMethodHandle, MethodInfo& setterMethodInfo, Type& realType" I noticed that it calls RuntimeMethodHandle.Value property which has the following attribute on get accessor "[SecurityPermission(SecurityAction.LinkDemand, UnmanagedCode=true)]"
So I went to my medium trust configuration and added another flag "UnmanagedCode" ""
I test the application again and it worked fine.
Now what is this all about?! It was working before so why now not it is not! There is something missing!!! Does System.Data.Entity changed during the several frequent updates post to of VS.NET 2008 SP1 and the latest one was made on Last August 2009. Because before that date, it was working fine.
So I would appreciate if any could clarify this and guide me if I am wrong, or there is something that I am missing.