ASP.NET如何读取Active Directory中的用户名和口令.
解决方案 »
- 收藏 不显示删除回复显示所有回复显示星级回复显示得分回复 启用调试无法连接到asp.net development server
- 这两句怎样变成相对路径?(ASP.NET)
- |M| 在Asp.NET 中 如何启动服务器中的一个WinForm程序
- #####################asp.net(C#)打印功能的实现,高手请进######################
- 关于dataset和recordset的问题
- DataGrid如何实现这种排序~?
- 怎么学PLC(斑竹勿移,马上结贴)
- DBNull.Value三目运算符,怪怪!!!
- 项目引用问题
- 测试ASP.NET的好地方,www.eraserver.net
- 请问高手!在ASP.NET中,如何实现模糊查询啊?今天没分了!对不起大家!急啊!
- thread.sleep 相关
取得用户名的: User.Identity.Name ,密码不知道.
{
try
{
string path = System.Configuration.ConfigurationSettings.AppSettings["DomainString"];
string strUserName = UserName + "@greatwall.com.cn";
if(path == "")
{
path = "GC://DC=xxx,DC=com,DC=cn";
}
DirectoryEntry dir = new DirectoryEntry(path,strUserName,UserPassword);
int intCount = dir.Properties.Count;
}
catch
{
return false;
}
return true;
}
这是一个校验域用户及密码的函数