The solution for this requirement is to use Win32 API LogonUser.
To add following in the class:
[COde[DllImport("ADVAPI32.dll", EntryPoint = "LogonUserW", SetLastError = true, CharSet = CharSet.Auto)]
public static extern bool LogonUser(string lpszUsername, string lpszDomain, string lpszPassword, int dwLogonType, int dwLogonProvider, ref IntPtr phToken);[/COde]
and in Button's click event, need to add following:
protected void Button1_Click(object sender, EventArgs e)
{
IntPtr token = IntPtr.Zero;
bool result = LogonUser(txtUser.Text, txtDomain.Text, txtPassword.Text, 2, 0, ref token);
if (result)
{
// Response.Write("User Authenticated.");
Response.Redirect("Welcome_Page.aspx");
}
else
{
Label2.Text="Invalid User, not authenicated. Please try again.";
}
Hope it helps someone.