检查当前用户是否登陆
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 = "修改密码失败"
};
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 = "修改密码失败"
};
相关文章推荐
- 判断Session--检查用户登陆是否超…
- javaWEB总结(33):检查用户是否登陆过滤器
- 检查当前用户是否具有管理员权限
- 检查当前用户是否具有管理员权限
- 判断当前登陆的用户是否是系统管理员
- [原创]java WEB学习笔记45:自定义HttpFilter类,理解多个Filter 代码的执行顺序,Filterdemo:禁用浏览器缓存的Filter,字符编码的Filter,检查用户是否登陆过的Filter
- 判断当前登陆的设配是否为手机用户
- SharePoint 检查当前用户是否在某sharePoint用户组中
- 用installshield 12打包时,检查当前用户是否为administrator用户的方法验证
- 检查 当前用户是否 管理员 isUserAdmin
- vc判断当前用户是否具有administrator 权限代码
- mysq显示当前登陆的用户
- Shell脚本编程-判断当前用户是否为root
- struts2验证用户是否登陆
- oracle查看当前登陆的用户信息
- 检查系统是否有非法新创建的用户
- 检查app的activity是否在当前
- 判断Oracle中当前的用户是否为管理员权限
- 使用Filter验证用户是否登陆,完整示例
- C#检测当前用户网络是否连接