PasswordRecovery控件如何才能不用Email就可以重置用户密码

firecsking firecsking 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
如题,附本人完全代码如下:
web.config文件:
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<connectionStrings>
<add name="SqlServices" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=D:\VS.NET\LoginTestDemo\App_Data\ASPNETDB.MDF;Integrated Security=True;User Instance=True" />

</connectionStrings>
<system.web>
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="20">
<providers>
<remove name="AspNetSqlProvider" />
<add name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SqlServices"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
passwordFormat="Hashed"
applicationName="/" />
</providers>
</membership>
</system.web>
</configuration>

PasswordRecovery.aspx 文件:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PasswordRecovery.aspx.cs" Inherits="PasswordGhost" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:PasswordRecovery ID="PasswordRecovery1" runat="server">

</asp:PasswordRecovery>

</div>
</form>
</body>
</html>

状况:老是出现必须设置STMP/EMAIL等信息,请问是否可以不用SendMail实现重置密码后跳转到Login.aspx页面??请代码说明,谢谢
...全文
评论 1
收藏 已收藏
分享
返回顶部
firecsking
.NET社区 62,272 成员 668,968 内容