System.NotSupportedException:指定的方法不支持

编程入门 行业动态 更新时间:2024-10-11 13:30:43
本文介绍了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:指定的方法不支持

本文发布于:2023-06-11 00:10:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/621963.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不支持   方法   System   NotSupportedException

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!