1
Answer

Setting A Password Policy for a web site in c# 2008

Janavi Bhatt

Janavi Bhatt

12y
941
1

Hi All,

I have a website in c# 2008.

I m assigned a task to set the password policy for this web site.

The password Policy goes as under:
   
1.  1st char is in UpperCase
2.  2nd char is in LowerCase
3.  3rd char is a special char
4.  4th to 8th char are random digits
5.  the password expires after 6 months
6. The password can be only 8 chars.    

This is really URGENT...I m not able to figure this out. Please advise...
Your advise and support are most appreciated.

Thanks & Regards,
Answers (1)
0
Vikram N
NA 66 14.7k 11y
thank u Sanjeeb...Lemme try it out...:)
0
Sanjeeb Lenka
NA 22.1k 1.3m 11y
check this code:

public int SaveEmp(Emp objEmp)
{
using (SqlConnection con = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=Test;Integrated Security=True"))
{
 string query = "Emplyentry";  //stored procedure name
using (SqlCommand cmd = new SqlCommand(query , con))
{
cmd.Parameters.AddWithValue("@EmpName", objEmp.EmpName);
cmd.Parameters.AddWithValue("@EmpSal", objEmp.EmpSal);
con.Open();
int a = cmd.ExecuteNonQuery();
con.Close();
return a;
}

}
}
0
Vikram N
NA 66 14.7k 11y
Thanx a lot for ur kind reply Sanjeeb,That linkhelped me a lot...
But in dat example, database tables are used... But i need stored procedures usage... kindly help:)