views:

271

answers:

1

I am currently working on an application using WPF and MVVM. Now if i go to another user's machine and try to launch my app, i get an Exception due to missing ReflectionPermission at BindToMethodInfo(Object, RuntimeMethodHandle, RuntimeTypeHandle, DelegateBindingFlags) in mscorlib.

Now my question is, what exactly requires the ReflectionPermission other than accessing private/protected properties? The properties i am binding to are all public and the ViewModel as well as the classes it uses are in the same assembly as the window that is binding to it.

+1  A: 

Try deploying application with ClickOnce by giving full trust.

The reason microsoft came up with DependencyProperties and such other concepts to avoid use of reflection as it requires this permission. However, either you can create a manifest that will require administrative rights to run the program or deploying with clickonce should help.

Akash Kava
I shouldn't require Reflectionpermission though, because all of the members i'm binding to are public, and as far as i know that doesn't require ReflectionPermission.
Botz3000