//不让浏览器缓存
context.Response.Buffer = true;
context.Response.ExpiresAbsolute = DateTime.Now.AddDays(-1);
context.Response.AddHeader("pragma", "no-cache");
context.Response.AddHeader("cache-control", "");
context.Response.CacheControl = "no-cache";
//一般处理文件(ashx)中使用Session需要继承IRequiresSessionState
IRequiresSessionState
时间: 2024-10-30 03:16:02