中程度の信頼でSubsonicを実行する際に問題が発生し、クエリが間違っているかどうかわかりません-中程度の信頼を嫌うsubsonic 3.0.3の一部がある場合、誰かに教えてもらえますか?他の誰かが少し前に似たようなものを投稿しましたが、それが存在するかどうかについての実際の回答はありませんでした(バグ)。ロブはそれがテストされたと言いましたが、他の誰かがまだバグが必要だと言いました(SubSonic 3.0-Medium Trust)
私は次のようなクエリを使用しています:
List<Data.Blog> objBlogPosts = ((from blog in db.Blogs
orderby blog.blogID descending
select blog).Take(10).ToList());
そして私が得ているエラーは次のとおりです:
System.MethodAccessException:
System.Runtime.CompilerServices.StrongBox`1..ctor(System.__Canon) --->
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
The demand was for:
<PermissionSet class="System.Security.PermissionSet"
version="1"
Unrestricted="true"/>
前もって感謝します。新しい亜音速やラムダなどが大好きで、最初の共有ホストへのデプロイに問題があります:(
乾杯ダグ