Subsonic 3.0 Medium Trust

I'm having a problem running Subsonic in the trust tool and don't know if I'm accessing the wrong one - if there is some part of Subsonic 3.0.3 that doesn't like trusting the environment, can someone tell me? Someone else posted something similar a while ago and there was no real answer to the question whether it existed or not (bug). Rob said it was tested while someone else said they still have to worry ( SubSonic 3.0 - Medium Trust )

I am using a query that looks like this:

List<Data.Blog> objBlogPosts = ((from blog in db.Blogs
                                            orderby blog.blogID descending 
                                             select blog).Take(10).ToList());

      

and the error I am getting:

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"/>  

      

Thanks in advance. Loving the new subsonic and lambda etc, just having trouble deploying my first shared host :(

amuses Doug

+2


source to share


2 answers


Subsonic DOES NOT WORK in shared hosting scenarios (well, they have medium trust anyway). The problem is this line ...

Func<IQueryable> fn = efn.Compile();

      

Maybe wait for 3.1 or go to 2.0, since the subsonic version is absolutely not an option at the moment. It was a great idea, but it's sad that beard necks don't tell their users about this problem.



At least they taught me to turn on

<system.web>
    <trust level="Medium" />
</system.web>

      

in my web.config for any development for shared hosting sites.

+1


source


Edit - the bug has now been fixed, version 3.1 will maintain trust in the environment when it is released, and if you pull the latest source from github and build it yourself, you should find it is running in trust mode on average.



It looks like you are facing this error . If you can add a few details to the bug report, such as the smallest possible test case that would be helpful.

+1


source







All Articles