if (!Membership.ValidateUr(LoginCheck.UrName, LoginCheck.Password))
{
LoginCheck.FindControl("WarmingImage").Visible = ca logictrue;
e.Authenticated = fal;
}
el
{
CheckBox CheckUr = (CheckBox)LoginCheck.FindControl("DigitalCertificates");
if (CheckUr.Checked)
{
X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
store.Open(OpenFlags.ReadWrite);
儿童节快乐英语 X509Certificate2Collection collection = (X509Certificate2Collection)store.Certificates;
foreach (X509Certificate2 X509 in collection)
{i am down
if (X509.Subject == "")
{
if (!X509.Verify())
{
ClientScript.RegisterClientScriptBlock(美国脱口秀节目this.GetType(), "JavaScript", "<script>alert('数据证书无效!')</script>");
e.Authenticated = fal;
break;
}
}
}
}
el
{
Session["ur"] = LoginCheck.UrName;
e.Authenticated = true;
}
}
<ClientSideEvents SelectedIndexChanged="function(s, e) {
ASPxClientUtils.SetCookie(DXGetCurrentThemeCookieName(),s.GetSelectedItem().value);
protected void Page_PreInit(object nder, EventArgs e)
{
string themeName = DefaultThemeName;
if (Page.Request.Cookies[GetThemeCookieName()] != null)
{
themeName = HttpUtility.UrlDecode(Page.Request.Cookies[GetThemeCookieName()].Value);
}
string clientScriptBlock = "var DXCurrentThemeCookieName = \"" + GetThemeCookieName() + "\";";
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "DXCurrentThemeCookieName", clientScriptBlock, true);
this.Theme = themeName;
}
<!--数据库配置-->
<connectionStrings>
<add name="iOfficeconnectionString" connectionString="rver=(local);uid=sa;pwd=;;"/>
</connectionStrings>
……
<!--错误页面配置-->
<卡梅伦辞职演讲customErrors mode="On" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
……
<appSettings>
<!--数据库备份位置-->
<add key="backupExists" value="../DataBackup/" />
<!--用户文件存储位置-->
<add key="currenturfile" value="../UrFile/" />
<!--公司文件存储位置-->
<add key="companyfile" value="../CompanyFile/" />
<!--职工头像位置-->
<add key="EmployeePhoto考研可以提前交卷吗" value="../CompanyFile/EmployeePhoto/" />
<!--车辆照片存储位置-->
<add key="CarsPhoto" value="../CompanyFile/CarPhoto/"diet是什么意思 />
</appSettings>
……
<!--用户管理-->
<membership defaultProvider="AspNetSqlMembershipProvider" urIsOnlineTimeWindow="10" hashAlgorithmType="">
<providers>
<clear />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="iOfficeconnectionString" enablePasswordRetrieval="fal" enablePasswordRet="true" requiresQuestionAndAnswer="fal" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5"damages minRequiredPasswordLength="1" minRequiredNonalp
hanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
</providers>
</membership>
<!--用户角色管理-->
<roleManager enabled="true" cacheRolesInCookie="true">
<providers>
<clear />
<add 交卸name="AspNetSqlRoleProvider" type失重环境="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="iOfficeconnectionString" applicationName="/" />
</providers>
</roleManager>……
Respon.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8"); //解决中文乱码
Respon.AddHeader("Content-Disposition", "attachment; filename=" +
Server.UrlEncode(file.Name)); //解决中文文件名乱码
Respon.AddHeader("Content-length", file.Length.ToString());
Respon.ContentType = "appliction/octet-stream";
Respon.WriteFile(file.FullName);
Respon.End();