在线考试页面怎样控制不能二次打开 在做一个考试系统,用的是forms身份验证,但是因为登陆时创建了Cookie,所以如果直接复制考试页面的地址,可以重新打开考试页面,请问怎样控制才可以使用户不能二次进入考试页面?希望大家给些好的建议 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 清空页面缓存 #region 清空客户端页面缓存 /// <summary> /// 清空客户端页面缓存 /// </summary> public static void ClearClientPageCache() { HttpContext.Current.Response.Buffer = true; HttpContext.Current.Response.Expires = 0; HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1); HttpContext.Current.Response.AddHeader("pragma", "no-cache"); HttpContext.Current.Response.AddHeader("cache-control", "private"); HttpContext.Current.Response.CacheControl = "no-cache"; }#endregion 记录访问时间,cookie时间和服务器记录不一致就是错误的. 可不可以考虑在Cookie中写入第几次登录了,如果>1就不允许登录。 这个建议用Application保存,安全!cookie不安全 请教一个asp.net后台弹出一个保存对话框(在线等) 求助:哪个在线编辑器好用?要求多浏览器支持! 请求类型的权限已失败怎么解决啊? 如何从 XML 文件读取部分数据,并绑定到 控件上! 如何取得ASP.NET运行状态(Debug或者Release) 关于自定义控件的一个小问题 请问这里有没有用C#和ASP.NET 做开发的啊? 框架刷新问题 使用COM.Excel组件完成数据导出功能 公共类中session问题 关于考试页面的时间控制 急需VS下的三个文件,希望大家帮帮忙
#region 清空客户端页面缓存
/// <summary>
/// 清空客户端页面缓存
/// </summary>
public static void ClearClientPageCache()
{
HttpContext.Current.Response.Buffer = true;
HttpContext.Current.Response.Expires = 0;
HttpContext.Current.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
HttpContext.Current.Response.AddHeader("pragma", "no-cache");
HttpContext.Current.Response.AddHeader("cache-control", "private");
HttpContext.Current.Response.CacheControl = "no-cache";
}
#endregion