您的位置:首页 > 其它

检查当前用户是否登陆

2005-03-16 08:53 399 查看
检查当前用户是否登陆
using System.Security.Principal;
this.Page.User.Identity.IsAuthenticated;

CHANGE PASSWORD:

string oldPsw , newPsw;
string userName = this.Page.User.Identity.Name;
userName = userName.Remove(0, userName.LastIndexOf('//') + 1);
DirectoryEntry user = new DirectoryEntry("WinNT://./" + userName);
oldPsw= txtOldpsd.Value;
newPsw= txtNewpsd.Value;
try
{
user.Invoke( "ChangePassword", new object[]{oldPsw, newPsw});
this.lblMessage.Text = "成功修改密码"
}
catch
{
this.lblMessage.Text = "修改密码失败"
};
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: