
08/02/2005, 21:33
|
| | Fecha de Ingreso: octubre-2004 Ubicación: Cuba
Mensajes: 21
Antigüedad: 20 años, 5 meses Puntos: 0 | |
un metodo que autentica contra ActiveDirectory Debes agregar un asambli que se llama System.DirectoryServices.dll
Domain = <nombre del dominio>
public bool IsAuthenticated(string aUser,string aPassword)
{
System.DirectoryServices.DirectoryEntry entry = new System.DirectoryServices.DirectoryEntry("LDAP://UCI.CU",Domain+"\\" + aUser, aPassword);
try
{
Object native = entry.NativeObject;
return true;
}
catch
{
return false;
}
}
lo de atraves de formulario no encuentro ningun codigo ahora por aqui, pero eso sencillo busco en la msdn, es agregar unas lineas en el web.config
S.
Ombao |