Subsonic 3.0 중간 신탁 문제
-
08-07-2019 - |
문제
나는 중간 신뢰에서 Subonic을 실행하는 데 문제가 있고 내가 잘못 쿼리하고 있는지 알지 못합니다. 중간 신뢰를 좋아하지 않는 Subsonic 3.0.3의 일부가 있다면 누군가 나에게 말할 수 있습니까? 다른 사람이 얼마 전에 비슷한 것을 게시했으며 그것이 존재했는지 아닌지에 대한 실제 대답은 없었습니다 (버그). Rob은 테스트를 받았으며 다른 사람이 여전히 버그를해야한다고 말했습니다.Subsonic 3.0- 중간 신뢰)
다음과 같은 모습을 사용하는 쿼리를 사용하고 있습니다.
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"/>
미리 감사드립니다. 새로운 Subsonic과 Lambda 등을 사랑하고, 첫 번째 공유 호스트에 배치하는 문제가 있습니다.
더그를 건배합니다
해결책
SubSonic은 공유 호스팅 시나리오에서 작동하지 않습니다 (어쨌든 중간 신뢰를 가진 사람). 문제는이 줄입니다 ...
Func<IQueryable> fn = efn.Compile();
Subsonic이 현재 옵션이 아니기 때문에 3.1을 기다리거나 2.0으로 이동할 수도 있습니다. 좋은 생각 이었지만 목 수염이 사용자 에게이 문제에 대해 말하지 않는 것은 슬픈 일입니다.
적어도 그들은 나에게 포함하도록 가르쳤다
<system.web>
<trust level="Medium" />
</system.web>
공유 호스팅 사이트의 개발에 대한 내 web.config에서.
다른 팁
편집 - 버그는 이제 고정되어 있습니다. 버전 3.1은 릴리스 될 때 중간 신뢰를 지원하며 GitHub에서 최신 버전의 소스를 가져 와서 직접 빌드하면 지금 중간 신뢰에서 작동한다는 것을 알게됩니다.
당신이 반대하는 것 같습니다 이것 벌레. 도움이 될 수있는 가장 작은 테스트 케이스와 같은 버그 보고서에 자세한 내용을 추가 할 수 있습니다.