Q:

Get BIOS date in asp.net

i check whether admin have licence or not so i check monthwise to login now i am using system date for check but admin change system date so i want date BIOS date
string crt_val = "",crt_mont = "",crt_year = "";
dt_v = objdata.select_upload();
if (dt_v.Rows.Count > 0)
{
    crt_val = dt_v.Rows[0]["val"].ToString();
    crt_mont = dt_v.Rows[0]["mon"].ToString();
    crt_year = dt_v.Rows[0]["yer"].ToString();
    //yy = Convert.ToInt32(crt_year);
}
else
{
    ScriptManager.RegisterStartupScript(this, this.GetType(), "Window", "alert('Please Update your Licence Key');", true);
    return;
}
if (Verification.Trim() != "")
{
    ScriptManager.RegisterStartupScript(this, this.GetType(), "Window", "alert('Please Update your Licence Key');", true);
    return;
}
string fin="";
string oyear = "";
oyear = DateTime.Now.Year.ToString();
int nyear = DateTime.Now.Year + 1;
int smonth = Convert.ToInt32(DateTime.Now.ToString("MM"));
fin = oyear + "-" + nyear.ToString();
int num;
switch (crt_mont)
{
    case ("January"):
        num = 1;
        break;
    case ("February"):
        num = 2;
        break;
    case ("March"):
        num = 3;
        break;
    case ("April"):
        num = 4;
        break;
    case ("May"):
        num = 5;
        break;
    case ("June"):
        num = 6;
        break;
    case ("July"):
        num = 7;
        break;
    case ("August"):
        num = 8;
        break;
    case ("September"):
        num = 9;
        break;
    case ("October"):
        num = 10;
        break;
    case ("November"):
        num = 11;
        break;
    default:
        num = 12;
        break;
}
if ((num < smonth) || (num == smonth))
{
    ScriptManager.RegisterStartupScript(this, this.GetType(), "Window", "alert('Please Update your Licence Key');", true);
}
else
{
    if (crt_val == "0")
    {
        Session["UserId"] = txtusername.Text.Trim();
        objuser.UserCode = txtusername.Text.Trim();
        objuser.Password = s_hex_md5(txtpassword.Text.Trim());
        string pwd = s_hex_md5(txtpassword.Text);
        objuser.Ccode = ddlCode.SelectedValue;
        objuser.Lcode = ddlLocation.SelectedValue;
        DataTable dt = new DataTable();
        dt = objdata.UserLogin(objuser);
        if (dt.Rows.Count > 0)
        {
            if ((dt.Rows[0]["UserCode"].ToString().Trim() == txtusername.Text.Trim()) && (dt.Rows[0]["Password"].ToString().Trim() == pwd) && (dt.Rows[0]["CompCode"].ToString().Trim() == ddlCode.SelectedValue) && (dt.Rows[0]["LocationCode"].ToString().Trim() == ddlLocation.SelectedValue))
            {
                Session["Isadmin"] = dt.Rows[0]["IsAdmin"].ToString().Trim();
                Session["Usernmdisplay"] = txtusername.Text.Trim();
                Session["Ccode"] = dt.Rows[0]["CompCode"].ToString().Trim();
                Session["Lcode"] = dt.Rows[0]["LocationCode"].ToString().Trim();
                if (Session["Isadmin"].ToString() == "1")
                {
                    Session["RoleCode"] = "1";
                }
                else
                {
                    Session["RoleCode"] = "2";
                }
                Response.Redirect("Dashboard.aspx");
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, this.GetType(), "Window", "alert('User Name and Password Wrong');", true);
            }
        }
        else
        {
            ScriptManager.RegisterStartupScript(this, this.GetType(), "Window", "alert('Please Update your Licence Key');", true);
        }
    }
    else
    { }
}

A:

Getting BIOS date won't change anything, because if someone changes the system date, the hardware real-time clock gets changed too.
Better option is to check date outside of client computer, so for example check some URL.

