开发者

MethodAccessException on AuthenticationBase<User>.UpdateUser Exception

I'm calling a UpdateUser on AuthenticationBase class in the System.ServiceModel.DomainServices.Server assembly installed by the WCF RIA Services installer. This works on my Win 7 desktop but on my Win 7 laptop, I get the following exception.

Any ideas on what I ought to be looking for or how I can determine what is different between the two systems? Thanks.

System.MethodAccessException was unhandled
      Message=Attempt by method 'System.ServiceModel.DomainServices.Server.ApplicationServices.AuthenticationBase`1<T>.IsReadOnly(System.Reflection.PropertyInfo)' to access method 'System.Linq.Enumerable.Cast<System.ComponentModel.DataAnnotations.EditableAttribute>(System.Collections.IEnum开发者_JAVA技巧erable)' failed.
      Source=System.ServiceModel.DomainServices.Server
      StackTrace:
           at System.ServiceModel.DomainServices.Server.ApplicationServices.AuthenticationBase`1.IsReadOnly(PropertyInfo propertyInfo)
           at System.ServiceModel.DomainServices.Server.ApplicationServices.AuthenticationBase`1.UpdateProfile(T user)
           at System.ServiceModel.DomainServices.Server.ApplicationServices.AuthenticationBase`1.UpdateUserCore(T user)
           at System.ServiceModel.DomainServices.Server.ApplicationServices.AuthenticationBase`1.UpdateUser(T user)


It sounds like you do not have Reflection permission on the laptop instance.

Are you perhaps running it under another user account?

Have a look at the MethodAccessException docs.

Also, make sure both are running the same version of .NET as there are security changes introduced in .NET 4.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜