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

[Solved] RadGrid + OpenAccess + Medium Trust = Security Exception

3 Answers 114 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mika Moser
Top achievements
Rank 1
Mika Moser asked on 07 Jan 2010, 06:39 PM
I don't know if I'm missing something or not, but when I try using the RadGrid and bind a OpenAccessDataSource object to it, the result is a Security Exception under Medium Trust.  If I bind the OpenAccessDataSource to just a normal ASP.NET Grid or ASP.NET ListView it works just fine.  Something inside of the RadGrid is triggering the error, is there something can turn off to get this to work? 

I've used the RadGrid with a EntityDataSource Object and it worked great.  This is a weird one, any ideas?

Thanks!
--
Chris

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 11 Jan 2010, 09:34 AM
Hello Chris,

I'm afraid that I'm unable to recreate the described behavior locally. I have attached a small sample please take a look and let us know if I'm missing something obvious.

Greetings,
Rosen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mika Moser
Top achievements
Rank 1
answered on 11 Jan 2010, 08:12 PM
Ok, so I found out what I was doing... it makes sense, but I'm just not sure why the default is this way...

By default, the RadGrid adds the DefaultInsertValue property to the GridBoundColumn, and that is what caused my error. I'm sure the code behind the DefaultInsertValue property uses reflection and reflection is turned off by default at the Medium trust security level.

--
Chris
0
Rosen
Telerik team
answered on 13 Jan 2010, 08:23 AM
Hello Chris,

Indeed I has able to recreate the error you have described. It is caused by the InstanceDescriptor usage inside the TypeConverter attached to the DefaultInsertValue property. Unfortunately due to this the TypeConverter cannot be used in medium trust in this particular case. As a temporary workaround I suggest you to remove the declarative assignment of DefaultInsertValue. We will do our best to address the issue for the next releases of the control. Meanwhile I have updated your telerik point for bringing this to our attention.

Regards,
Rosen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Mika Moser
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Mika Moser
Top achievements
Rank 1
Share this question
or