Active Directory身份验证 [英] Active Directory Authentication

查看:97
本文介绍了Active Directory身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的网址是https://some.world.com/xyz/state.asmx



我是新的LDAP身份验证请帮我弄清楚LDAP路径。

或使用交换网址如何验证用户身份。我们需要验证的是什么。

请帮忙..

Hi,
I have url like https://some.world.com/xyz/state.asmx

I am new to LDAP authentication Please help me to figure out the LDAP path.
or using exchange url how can i authenticate user.What are all we need to authenticate.
Please help..

推荐答案

请尝试自己搜索或使用Google。



我在几秒钟内发现了这个a href =http://www.codeproject.com/Articles/18742/Simple-Active-Directory-Authentication-Using-LDAP>使用LDAP和ASP.NET进行简单的Active Directory身份验证 [ ^ ]
Please try searching for yourself or use Google.

I found this in seconds Simple Active Directory Authentication Using LDAP and ASP.NET[^]


using Microsoft.Exchange.WebServices.Data;
public static bool ValidateUser(string userName, string password)
{
  bool _ExchangeConnected = false;
  try
  {
   String domain = "xy";
   String exchangeURL = "url";
   String email = "aaaa.abc@mail.com";
   userName = String.Format("{0}\\{1}", domain, userName);
   ExchangeService exchangeService = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
   exchangeService.Credentials = new WebCredentials(userName, password);
   exchangeService.Url = new Uri(exchangeURL);
   exchangeService.KeepAlive = true;
   Mailbox mailbox = new Mailbox(email);
   FolderId folder = new FolderId(WellKnownFolderName.Inbox, mailbox);
   ItemView view = new ItemView(1);
   FindItemsResults<Item> items = exchangeService.FindItems(folder, view);
   _ExchangeConnected = true;
  }
  catch (Exception ex)
  {
   Logger.CreateLog.LogInfo(ex);
   _ExchangeConnected = false;
  }
  return _ExchangeConnected;
 }


这篇关于Active Directory身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆