Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MethodAccessException reported from CF 2.0 #30

Closed
GoogleCodeExporter opened this issue Jul 1, 2015 · 2 comments
Closed

MethodAccessException reported from CF 2.0 #30

GoogleCodeExporter opened this issue Jul 1, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

Run the QuickStart project under CF 2.0 (tweaking the async TcpListener to 
sync); the List<T>.Sort method reports MethodAccessException when looking 
at Contact/Customer.

Original issue reported on code.google.com by marc.gravell on 20 Nov 2008 at 7:34

@GoogleCodeExporter
Copy link
Author

This turns out to be a curiosity of the CF 2.0 security model when using 
generics 
with internal classes from other assemblies (i.e. where the T is private to the 
generic code). Even if no nasty access is attempted, the code (especially 
List<T>.Sort) can break horribly.

Fix: mark your data classes as public, not internal.

Original comment by marc.gravell on 20 Nov 2008 at 7:36

@GoogleCodeExporter
Copy link
Author

Original comment by marc.gravell on 20 Nov 2008 at 9:51

  • Changed state: Verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant