本文介绍了System.NotSupportedException:指定的方法不支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能获取用户的密码?怎么样,好吗?当我已经试过这code:
Is it possible to get the password of a user? How, please? When I've tried this code :
WebSecurity.InitializeDatabaseConnection("nectarys-pc.MonitoringN.dbo", "Superviseur", "UserId", "matricule", autoCreateTables: true); var membership = (SimpleMembershipProvider)Membership.Provider; model.motDePasse = membership.GetUser(superviseur.matricule, false).GetPassword();这个例外出现在最后一行:
This exception appears in the last line :
System.NotSupportedException:指定的方法不支持
System.NotSupportedException: Specified method is not supported.
如何应对呢?
注意是 superviseur.matricule 不是问题的根源。
推荐答案根据MSDN - 如果EnablePasswordRetrieval在web.config中是假的,一个NotSupportedException异常被抛出。
As per MSDN - If EnablePasswordRetrieval in web.config is false, a NotSupportedException exception is thrown.
勾选此资源,找出如何在Web.config中 enablePasswordReset设置
Check this resource to find out how to set enablePasswordReset in Web.config
更多推荐
System.NotSupportedException:指定的方法不支持
发布评论