首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AuthenticationBase<User>.UpdateUser异常时的MethodAccessException

AuthenticationBase<User>.UpdateUser异常时的MethodAccessException
EN

Stack Overflow用户
提问于 2010-09-09 14:20:05
回答 1查看 499关注 0票数 1

我在AuthenticationBase上调用WCF RIA Services安装程序安装的System.ServiceModel.DomainServices.Server程序集中的UpdateUser类。这在我的Win 7桌面上工作,但在我的Win 7笔记本电脑上,我得到了以下异常。

关于我应该寻找什么,或者我如何确定两个系统之间的不同之处,有什么想法吗?谢谢。

代码语言:javascript
复制
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.IEnumerable)' 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)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-09-09 14:23:42

听起来您没有对笔记本电脑实例的反射权限。

您是否正在使用另一个用户帐户运行它?

看一看MethodAccessException docs

此外,请确保两者运行的.NET版本相同,因为.NET 4中引入了安全更改。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3674240

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档