/// <summary> /// 管理后台调用的脚本 /// </summary> public void Read() { /* * MemoryStream ms = new MemoryStream(); * WebManagerResource.loading_process.Save(ms, ImageFormat.Gif); * string x = Convert.ToBase64String(ms.ToArray()); * ms.Dispose(); * throw new Exception(x); */ //String resName =Encoding.UTF8.GetString(Convert.FromBase64String(context.Request.Query("res"))); //context.Response.Write(resName+"/"+Convert.ToBase64String(Encoding.UTF8.GetBytes("manage_js_min"))); return; /* To Base64 */ //byte[] data2=Encoding.UTF8.GetBytes("sys_tab"); //context.Response.Write(Convert.ToBase64String(data2, 0, data2.Length)); return; const int maxAge = 31536000; DateTime sinceTime; var nowTime = DateTime.Now.ToUniversalTime(); Request.TryGetHeader("If-Modified-Since", out var sinceModified); DateTime.TryParse(sinceModified, out sinceTime); sinceTime = sinceTime.ToUniversalTime(); if (!string.IsNullOrEmpty(sinceModified) && (nowTime - sinceTime).TotalSeconds < maxAge) { Response.StatusCode(304); // context.Response.Status = "304 Not Modified"; return; } else { // if (Settings.Opti_SupportGZip) // { // context.Response.Filter = new GZipStream(context.Response.Filter, CompressionMode.Compress); // context.Response.AddHeader("Content-Encoding", "gzip"); // } Response.AppendHeader("Cache-Control", "max-age=" + maxAge.ToString()); Response.AppendHeader("Last-Modified", nowTime.ToString("r")); Response.AppendHeader("Expires", DateTime.Now.AddYears(1).ToString("r")); Response.AppendHeader("ETag", "\"" + DateTime.Now.Ticks + "\""); /* * response.Cache.SetETag(lastModified.Ticks.ToString()); * response.Cache.SetLastModified(lastModified); * //public 以指定响应能由客户端和共享(代理)缓存进行缓存。 * response.Cache.SetCacheability(HttpCacheability.Public); * //是允许文档在被视为陈旧之前存在的最长绝对时间。 * response.Cache.SetMaxAge(new TimeSpan(7, 0, 0, 0)); * //将缓存过期从绝对时间设置为可调时间 * response.Cache.SetSlidingExpiration(true); */ var filename = Encoding.UTF8.GetString(Convert.FromBase64String(Request.Query("res"))); //获取文件MImE类型 var mime = fileMImE.ContainsKey(filename) ? fileMImE[filename] : "text/plain"; if (Regex.IsMatch(mime, "^image\\/(jpg|png|gif)$", RegexOptions.IgnoreCase)) { Response.ContentType(mime); //ajax_loading图片 if (filename == "ajax_loader") { //const string data = "R0lGODlhGAAYAPQAAP///wCA/87m/vr8/uDv/rDX/ujz/o7G/sjj/pzN/tjr/qjT/sDf/vL4/na6/obC/rjb/miz/gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH+GkNyZWF0ZWQgd2l0aCBhamF4bG9hZC5pbmZvACH5BAAHAAAAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAGAAYAAAFriAgjiQAQWVaDgr5POSgkoTDjFE0NoQ8iw8HQZQTDQjDn4jhSABhAAOhoTqSDg7qSUQwxEaEwwFhXHhHgzOA1xshxAnfTzotGRaHglJqkJcaVEqCgyoCBQkJBQKDDXQGDYaIioyOgYSXA36XIgYMBWRzXZoKBQUMmil0lgalLSIClgBpO0g+s26nUWddXyoEDIsACq5SsTMMDIECwUdJPw0Mzsu0qHYkw72bBmozIQAh+QQABwABACwAAAAAGAAYAAAFsCAgjiTAMGVaDgR5HKQwqKNxIKPjjFCk0KNXC6ATKSI7oAhxWIhezwhENTCQEoeGCdWIPEgzESGxEIgGBWstEW4QCGGAIJEoxGmGt5ZkgCRQQHkGd2CESoeIIwoMBQUMP4cNeQQGDYuNj4iSb5WJnmeGng0CDGaBlIQEJziHk3sABidDAHBgagButSKvAAoyuHuUYHgCkAZqebw0AgLBQyyzNKO3byNuoSS8x8OfwIchACH5BAAHAAIALAAAAAAYABgAAAW4ICCOJIAgZVoOBJkkpDKoo5EI43GMjNPSokXCINKJCI4HcCRIQEQvqIOhGhBHhUTDhGo4diOZyFAoKEQDxra2mAEgjghOpCgz3LTBIxJ5kgwMBShACREHZ1V4Kg1rS44pBAgMDAg/Sw0GBAQGDZGTlY+YmpyPpSQDiqYiDQoCliqZBqkGAgKIS5kEjQ21VwCyp76dBHiNvz+MR74AqSOdVwbQuo+abppo10ssjd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ScKdceCAjDII7HcQ4EMTCpyrCuUBjCYRgHVtqlAiB1YhiCnlsRkAAAOwAAAAAAAAAAAA=="; var bytes = Convert.FromBase64String(data); Response.Write(bytes, 0, bytes.Length); } else if (filename == "load_process") { const string data = "R0lGODlhQAAKAMIAAMzOzOTm5NTW1Pz6/Nza3P///wAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJBgAFACwAAAAAQAAKAAADb1i63P4wykmrvXLowTZfXreJGvkpITgugEAATPvGLszW9Hzrimz3uAUhECAwBETjAlk8Jp3N5VMaVTCV1mm2WhhyvdiuVvwdg2MEXgGQ/q3baDVbDmfVe/dCCrXil1R/fid6fYSBhoMYiouMjY4XCQAh+QQJBgAJACwAAAAAQAAKAIPEwsTk5uTU0tTc2tzMysz8+vzU1tTc3tzMzsz///8AAAAAAAAAAAAAAAAAAAAAAAAEmTDJSau9OOs8BPLesI1kaRnHoA6HIRVwQcXyRM8xDuv1mycoAAEBaEkQAwOCgjAMlpPmk+mEHqvUaRSbYBEMAoKxGwiIJobyWZI2U9proPo9R9dRBIFB7JK7JwN1EoF/g4JkhYhxhGdOQgRFfQIqVglIWkeUTJpRnJmYlpwoSSljNzY/Pjuoq6o9CaeugwIgH3EmuLm6u7wbEQAh+QQJBgALACwAAAAAQAAKAIOkoqTU1tS8urz8+vzMzsysrqzk5uTEwsTc2ty8vry0trT///8AAAAAAAAAAAAAAAAElnDJSau9OOssgP/CJo6kVSRoWkhDO1DuO8WwW7e3zNpLcSgCheKwWhAQAQKFEEAoJ0znsvmURKtG6lTa+wkS3yLCYEBQAmTzBF0+p93t9Vse9ylQYQlbLRnH+3OAfwt+fISBh3UJQEEJRUdcVgiRRpNYkJeWS5pQnD5fAgJEOzgzPKQ6CzSmpag5Eh0fHgoltba3uLklEQAh+QQJBgANACwAAAAAQAAKAIOkoqTU0tS8urz8+vzc3tzMysysrqzc2tzU1tTEwsTk5uTMzsy0srT///8AAAAAAAAEp7DJSau9OOssgP/CsQTjeGxoihqswb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t/f1M4AuglxzICOHJYknBykoiI+KkScsLRiXmJmam5cJADs="; var bytes = Convert.FromBase64String(data); Response.Write(bytes, 0, bytes.Length); } else if (filename == "cms_top_logo") { var file = new FileInfo($"{EnvUtil.GetBaseDirectory()}/{CmsVariables.FRAMEWORK_PATH}local/logo.gif"); if (file.Exists) { var bit = new Bitmap(file.FullName); var stream = new MemoryStream(); bit.Save(stream, ImageFormat.Gif); bit.Dispose(); Response.WriteAsync(stream.ToArray()); stream.Dispose(); } else { var bytes = ResourcesReader.ReadBytes(typeof(SiteResourceInit).Assembly, "logo.png"); Response.WriteAsync(bytes); } } else { // using (var bit = WebManagerResource.ResourceManager.GetObject(filename) as Bitmap) // { // var stream = new MemoryStream(); // bit.Save(stream, ImageFormat.Gif); // bit.Dispose(); // var bytes = stream.ToArray(); // Response.Write(bytes, 0, bytes.Length); // stream.Dispose(); // } } } else { Response.ContentType(mime + ";charset=utf-8"); if (filename == "style") { Response.WriteAsync( ResourceUtility.CompressHtml( ResourceMap.GetPageContent(ManagementPage.Css_Style) )); } else { // var res = WebManagerResource.ResourceManager.GetString(filename); // Response.WriteAsync(ResourceUtility.CompressHtml(res)); } } //HttpContextAdapter.Current.Raw.Response.AddHeader("Content-Disposition", "attachment;filename=cms"); } }