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

Using OpenAccess in Medium Trust

2 Answers 48 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brendan Enrick
Top achievements
Rank 1
Brendan Enrick asked on 18 Sep 2009, 07:14 PM
Hello,

I am aware that OpenAccess works in medium trust environments, but certain features will require more permission.

http://www.telerik.com/help/openaccess-orm/deploying-openaccess-partial-trust-environments.html

For some reason this code requires more than medium trust.

DateTime maxDateCreated = _objectScope.Extent<MyObject>().Max(o => o.DateCreated); 
 


Thanks for the help,
Brendan

2 Answers, 1 is accepted

Sort by
0
Accepted
Thomas
Telerik team
answered on 21 Sep 2009, 02:00 PM
Hi Brendan Enrick,

is this a LINQ specific issue? What are the access rights on MyObject and DateCreated? LINQ will use reflection to get to the properties and fields and methods, so all that is used must be public.
Can you please verify that and give us a stack trace if possible?

All the best,
Thomas
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
Brendan Enrick
Top achievements
Rank 1
answered on 24 Sep 2009, 03:27 PM
Thanks. That was my mistake it actually wasn't OpenAccess causing the trust issue. I fixed the offending code once I looked more closely.

Brendan
Tags
Getting Started
Asked by
Brendan Enrick
Top achievements
Rank 1
Answers by
Thomas
Telerik team
Brendan Enrick
Top achievements
Rank 1
Share this question
or