This is a migrated thread and some comments may be shown as answers.

Security Exception in Medium Trust environment

1 Answer 104 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul Taylor
Top achievements
Rank 1
Paul Taylor asked on 20 Dec 2010, 04:39 PM
When I use the following RadGrid in an application designed for a Medium Trust environment, I get a Security Exception (missing Reflection permission). The exception trace is below. The version of the controls that I am using is 2009.3.1103.0. Any ideas why and how I can get around this ?

    <telerik:RadGrid ID="grdContacts" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
        AllowSorting="True" AutoGenerateColumns="False" GridLines="None">
        <MasterTableView>
            <Columns>
                <telerik:GridHyperLinkColumn Text="Edit" DataNavigateUrlFields="ID" UniqueName="Edit"
                    ItemStyle-CssClass="command-column" />
                <telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID" />
                <telerik:GridBoundColumn DataField="Status" HeaderText="Name" UniqueName="Status" />
                <telerik:GridBoundColumn DataField="Title" HeaderText="Guid" UniqueName="Title" />
                <telerik:GridBoundColumn DataField="Forename" HeaderText="Type" UniqueName="Forename" />
                <telerik:GridBoundColumn DataField="Surname" HeaderText="Surname" UniqueName="Surname" />
                <telerik:GridBoundColumn DataField="Company" HeaderText="Company" UniqueName="Company" />
                <telerik:GridBoundColumn DataField="Town" HeaderText="Town" UniqueName="Town" />
                <telerik:GridBoundColumn DataField="Postcode" HeaderText="Postcode" UniqueName="Postcode" />
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>

[SecurityException: Request for the permission of type 'System.Security.Permissions.ReflectionPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +150
System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100
System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +283
System.Security.PermissionSetTriple.CheckSetDemand(PermissionSet demandSet, PermissionSet& alteredDemandset, RuntimeMethodHandle rmh) +69
System.Security.PermissionListSet.CheckSetDemand(PermissionSet pset, RuntimeMethodHandle rmh) +150
System.Security.PermissionListSet.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +30
System.Threading.CompressedStack.DemandFlagsOrGrantSet(Int32 flags, PermissionSet grantSet) +40
System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant, CompressedStack securityContext) +123
System.Security.CodeAccessSecurityEngine.ReflectionTargetDemandHelper(Int32 permission, PermissionSet targetGrant) +54

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 22 Dec 2010, 02:39 PM
Hello Paul,

Check this article for more information on how to overcome the issue.

Greetings,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
Paul Taylor
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or