首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Subsonic 3.0中等信任问题

Subsonic 3.0中等信任问题
EN

Stack Overflow用户
提问于 2009-09-17 11:41:44
回答 2查看 723关注 0票数 2

我在中等信任模式下运行Subsonic有一个问题,不知道我是否查询错了--如果subsonic 3.0.3的某些部分不喜欢中等信任,有人能告诉我吗?不久前,另一个人发布了类似的帖子,并没有关于它是否存在的真正回复( bug)。Rob说它已经测试过了,而另一个人说他们仍然需要bug (SubSonic 3.0 - Medium Trust)

我使用的查询如下所示:

代码语言:javascript
复制
List<Data.Blog> objBlogPosts = ((from blog in db.Blogs
                                            orderby blog.blogID descending 
                                             select blog).Take(10).ToList());

我得到的错误是:

代码语言:javascript
复制
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等,只是在部署到我的第一个共享主机上有问题:(

干杯道格

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2010-07-10 03:57:24

Subsonic将不会在共享主机场景中工作(好吧,那些有中等信任的场景)。问题是这条线。

代码语言:javascript
复制
Func<IQueryable> fn = efn.Compile();

也许等待3.1或2.0,因为亚音速目前绝对不是一个选择。这是一个很好的想法,但遗憾的是,脖子上的胡子并没有告诉他们的用户这个问题。

至少他们教会我包括

代码语言:javascript
复制
<system.web>
    <trust level="Medium" />
</system.web>

在我的web.config中用于任何共享主机站点的开发。

票数 1
EN

Stack Overflow用户

发布于 2009-09-17 13:40:37

编辑-错误现在已经修复,3.1版本发布后将支持中等信任,如果你从github上拉出最新版本的源代码并自己构建,你会发现它现在在中等信任下工作。

看起来你遇到了this bug。如果您可以在bug报告中添加更多细节,比如最小的测试用例,这将是很有帮助的。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1438336

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档