1
I’m currently developing a Webapp where I have already managed to get login to confirm the user credentials in the AD. Basically the login already works correctly. My goal now is to create 1 group in AD and specify that only those in that group can access the application. Does anyone know how to do this ?
DllImport("advapi32.dll")]
public static extern bool LogonUser(string name, string domain, string pass, int logType, int logpv, ref IntPtr pht);
protected void Button1_Click(object sender, EventArgs e)
{
IntPtr th = IntPtr.Zero; bool log = LogonUser(txt_user.Text, "dominio", txt_pass.Text, 2, 0, ref th);
if (log)
}
is it possible to enter more details in the question? Type: how is the class you log in to.
– Renan Carlos
I’ve done a lot of research and found this code and so far it’s working. He can recognize the user and tell me if his credentials are right or wrong. What I’m missing now as I said is the restrictions, only those who were in the AD group have access to the application.
– Andre Brandao