复制代码 代码如下:
<connectionStrings>
<add connectionString="server=.;database=data;uid=sa;pwd=123;" />
</connectionStrings>
复制代码 代码如下:
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
<providers>
<clear/>
<add
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="SqlServices"
applicationName="dev"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="false"
passwordFormat="Hashed"
minRequiredPasswordLength="1"
minRequiredNonalphanumericCharacters="0"
/>
</providers>
</membership>
复制代码 代码如下:
MembershipUser mem = Membership.GetUser(this.lblUserName.Text);
string p = mem.ResetPassword();
mem.ChangePassword(p, "123456");
新闻热点
疑难解答
图片精选