数字证书验证代码数字证书验证代码
1) 数字证书验证代码
if (!Membership.ValidateUser(LoginCheck.UserName, LoginCheck.Password))
{
LoginCheck.FindControl("WarmingImage").Visible = true;
e.Authenticated = false;
}
else
{
CheckBox CheckUser = (CheckBox)LoginCheck.FindControl("DigitalCertificate...
数字证
验证代码
1) 数字证书验证代码
if (!Membership.ValidateUser(LoginCheck.UserName, LoginCheck.Password))
{
LoginCheck.FindControl("WarmingImage").Visible = true;
e.Authenticated = false;
}
else
{
CheckBox CheckUser = (CheckBox)LoginCheck.FindControl("DigitalCertificates");
if (CheckUser.Checked)
{
X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadWrite);
collection = X509Certificate2Collection
(X509Certificate2Collection)store.Certificates;
foreach (X509Certificate2 X509 in collection)
{
if (X509.Subject == "CN=iOffice.net")
{
if (!X509.Verify())
{
ClientScript.RegisterClientScriptBlock(this.GetType(),
"JavaScript", "");
e.Authenticated = false;
break;
}
}
}
}
else
{
Session["user"] = LoginCheck.UserName;
e.Authenticated = true;
}
}
2) 系统风格转换代码
……
……
……
……
本文档为【数字证书验证代码】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。