我的图片存储在App_Data文件夹中,因此我使用了虚拟文件夹插件。以下是web.config中的代码段:
<resizer>
<clientcache minutes="2880" />
<plugins>
<add name="FolderResizeSyntax" />
<add name="TinyCache" />
<add name="VirtualFolder" virtualPath="~/MyImages" physicalPath="App_Data\Media" vpp="true" />
</plugins>
</resizer>
以下网址公开&#34;到期&#34;标题正确
http://localhost/MyImages/1d68ee8b-6f24-4dd3-b5ad-e0c94c8ee43e.jpg?w=1110&h=215
以下网址错误地将Expires标头公开为-1
http://localhost/MyImages/resize(1110,215)/1d68ee8b-6f24-4dd3-b5ad-e0c94c8ee43e.jpg
诊断信息:
Image resizer diagnostic sheet localhost 02/05/2017 07:25:53
0 Issues detected:
Assembly use report:
You do not seem to be using any plugins from (commerical/AGPL) editions.
Registered plugins:
ImageResizer.Plugins.Basic.DefaultEncoder
ImageResizer.Plugins.Basic.NoCache
ImageResizer.Plugins.Basic.ClientCache
ImageResizer.Plugins.Basic.Diagnostic
ImageResizer.Plugins.Basic.WebConfigLicenseReader
ImageResizer.Plugins.Basic.SizeLimiting
ImageResizer.Plugins.Basic.MvcRoutingShimPlugin
ImageResizer.Plugins.Basic.FolderResizeSyntax
ImageResizer.Plugins.TinyCache.TinyCachePlugin
ImageResizer.Plugins.Basic.VirtualFolder
Configuration:
<resizer>
<clientcache minutes="2880" />
<plugins>
<add name="FolderResizeSyntax" />
<add name="TinyCache" />
<add name="VirtualFolder" virtualPath="~/MyImages" physicalPath="App_Data\Media" vpp="true" />
</plugins>
</resizer>
Accepted querystring keys:
quality, format, thumbnail, maxwidth, maxheight, width, height, w, h, crop, page, bgcolor, rotate, flip, sourceFlip, sFlip, sRotate, borderWidth, borderColor, paddingWidth, paddingColor, frame, useresizingpipeline, cache, process, margin, dpi, zoom, autorotate,
Accepted file extensions:
bmp, gif, exif, png, tif, tiff, tff, jpg, jpeg, jpe, jif, jfif, jfi,
Environment information:
Running Microsoft-IIS/10.0 on Microsoft Windows NT 10.0.10586.0 and CLR 4.0.30319.42000
Trust level: Unrestricted
OS bitness: AMD64
Executing assembly: c:\windows\system32\inetsrv\w3wp.exe
IntegratedPipeline: True
Installed HttpModules:
System.Web.Caching.OutputCacheModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyOutputCache)
System.Web.SessionState.SessionStateModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keySession)
System.Web.Security.WindowsAuthenticationModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyWindowsAuthentication)
System.Web.Security.FormsAuthenticationModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyFormsAuthentication)
System.Web.Security.DefaultAuthenticationModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyDefaultAuthentication)
System.Web.Security.RoleManagerModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyRoleManager)
System.Web.Security.UrlAuthorizationModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyUrlAuthorization)
System.Web.Security.FileAuthorizationModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyFileAuthorization)
System.Web.Security.AnonymousIdentificationModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyAnonymousIdentification)
System.Web.Profile.ProfileModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyProfile)
System.Web.UrlMappingsModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyUrlMappingsModule)
System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under keyUrlRoutingModule-4.0)
System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (under keyScriptModule-4.0)
ImageResizer.InterceptModule, ImageResizer, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null (under keyImageResizingModule)
Autofac.Integration.Mvc.RequestLifetimeHttpModule, Autofac.Integration.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da (under key__DynamicModule_Autofac.Integration.Mvc.RequestLifetimeHttpModule, Autofac.Integration.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da_10520903-923d-48aa-9feb-6b12366c5de4)
Microsoft.Owin.Host.SystemWeb.OwinHttpModule, Microsoft.Owin.Host.SystemWeb, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (under key__DynamicModule_Microsoft.Owin.Host.SystemWeb.OwinHttpModule, Microsoft.Owin.Host.SystemWeb, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_f8a79548-0754-4d88-ab62-3b1bd7ef504d)
Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.PageInspectorHttpModule, Microsoft.VisualStudio.Web.PageInspector.Runtime, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a (under key__DynamicModule_Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.PageInspectorHttpModule, Microsoft.VisualStudio.Web.PageInspector.Runtime, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a_9f19eadd-1e83-4417-b925-a280a7b04126)
System.Web.WebPages.WebPageHttpModule, System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (under key__DynamicModule_System.Web.WebPages.WebPageHttpModule, System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_2528bc3e-20d9-4877-9d23-6d5075ff8be5)
System.Web.Optimization.BundleModule, System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 (under key__DynamicModule_System.Web.Optimization.BundleModule, System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35_a85dc663-67ab-4d14-a828-f574db7a4668)
Loaded assemblies:
mscorlib Assembly: 4.0.0.0 File: 4.6.1080.0 Info: 4.6.1080.0
System.Web Assembly: 4.0.0.0 File: 4.6.1073.0 Info: 4.6.1073.0
System Assembly: 4.0.0.0 File: 4.6.1081.0 Info: 4.6.1081.0
System.Core Assembly: 4.0.0.0 File: 4.6.1084.0 Info: 4.6.1084.0
System.Configuration Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Xml Assembly: 4.0.0.0 File: 4.6.1064.2 Info: 4.6.1064.2
System.Web.ApplicationServices Assembly: 4.0.0.0 File: 4.6.1073.0 Info: 4.6.1073.0
System.Runtime.Caching Assembly: 4.0.0.0 File: 4.6.1073.0 Info: 4.6.1073.0
Microsoft.Build.Utilities.v4.0 Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Web.RegularExpressions Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
Microsoft.JScript Assembly: 10.0.0.0 File: 14.0.1038.0 Info: 14.0.1038.0
Microsoft.CodeDom.Providers.DotNetCompilerPlatform Assembly: 1.0.4.0 File: 1.0.40419.0 Info: 1.0.4-40419
Microsoft.VisualStudio.Web.PageInspector.Loader Assembly: 1.0.0.0 File: 14.1.11107.0 Info: 14.1.11022.0.Main.b428
System.Web.WebPages Assembly: 3.0.0.0 File: 3.0.30128.0 Info: 3.0.3-30128 (0e974218e12a67d4b1f25422119e40cfe6953e46)
System.Web.Mvc Assembly: 5.2.3.0 File: 5.2.30128.0 Info: 5.2.3-30128 (0e974218e12a67d4b1f25422119e40cfe6953e46)
System.Web.Optimization Assembly: 1.1.0.0 File: 1.1.40211.0
Autofac.Integration.Mvc Assembly: 4.0.0.0 File: 4.0.2.242 Info: 4.0.2-CI-242
Microsoft.Owin.Host.SystemWeb Assembly: 3.1.0.0 File: 3.1.60405.82 Info: 3.1.0
System.Web.WebPages.Deployment Assembly: 3.0.0.0 File: 3.0.30128.0 Info: 3.0.3-30128 (0e974218e12a67d4b1f25422119e40cfe6953e46)
System.Web.WebPages.Razor Assembly: 3.0.0.0 File: 3.0.30128.0 Info: 3.0.3-30128 (0e974218e12a67d4b1f25422119e40cfe6953e46)
Microsoft.Web.Infrastructure Assembly: 1.0.0.0 File: 1.0.20105.407
Microsoft.VisualStudio.Web.PageInspector.Runtime Assembly: 14.0.0.0 File: 14.1.11107.0 Info: 14.1.11022.0.Main.b428
Microsoft.VisualStudio.Web.PageInspector.Tracing Assembly: 14.0.0.0 File: 14.1.11107.0 Info: 14.1.11022.0.Main.b428
App_global.asax.9ial-0z2 Assembly: 0.0.0.0
Website.Portal Assembly: 1.0.0.0 File: 1.0.0.0
System.Web.Extensions Assembly: 4.0.0.0 File: 4.6.1073.0 Info: 4.6.1073.0
Microsoft.CSharp Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Data Assembly: 4.0.0.0 File: 4.6.1082.0 Info: 4.6.1082.0
System.Web.Services Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Drawing Assembly: 4.0.0.0 File: 4.6.1078.0 Info: 4.6.1078.0
System.EnterpriseServices Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.IdentityModel Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Runtime.Serialization Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.ServiceModel Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.ServiceModel.Activation Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.ServiceModel.Web Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Activities Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.ServiceModel.Activities Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.WorkflowServices Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Data.DataSetExtensions Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Xml.Linq Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.ComponentModel.DataAnnotations Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Web.DynamicData Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
Antlr3.Runtime Assembly: 3.5.0.2 File: 3.5.0.2
Autofac Assembly: 4.5.0.0 File: 4.5.0.0 Info: 4.5.0-develop-00406
Autofac.Integration.Mvc.Owin Assembly: 4.0.0.0 File: 4.0.1.222 Info: 4.0.1-CI-222
Autofac.Integration.Owin Assembly: 4.0.0.0 File: 4.0.0.232 Info: 4.0.0-CI-232
Autofac.Integration.WebApi Assembly: 4.0.0.0 File: 4.0.1.230 Info: 4.0.1-CI-230
Autofac.Integration.WebApi.Owin Assembly: 4.0.0.0 File: 4.0.0.226 Info: 4.0.0-CI-226
AutoMapper Assembly: 6.0.2.0 File: 6.0.2.0 Info: 6.0.2-master-8b260ff1
AutoMapper.EF6 Assembly: 1.0.0.0 File: 1.0.0.0 Info: 1.0.0
CsvHelper Assembly: 2.0.0.0 File: 2.16.3.0 Info: 2.16.3.0
DelegateDecompiler Assembly: 1.0.0.0 File: 0.23.0
DelegateDecompiler.EntityFramework Assembly: 1.0.0.0 File: 0.23.0
EntityFramework Assembly: 6.0.0.0 File: 6.1.40302.0 Info: 6.1.3-40302
EntityFramework.SqlServer Assembly: 6.0.0.0 File: 6.1.40302.0 Info: 6.1.3-40302
GridMvc Assembly: 2.0.0.0 File: 2.0.0.0
ImageResizer Assembly: 4.0.0.0 File: 4.0.5.942 Info: 4.0.5 Commit: 3d5572f812a7c9252402583ffbb006d08baa90f0
ImageResizer.Plugins.TinyCache Assembly: 4.0.0.0 File: 4.0.5.942 Info: 4.0.5 Commit: 3d5572f812a7c9252402583ffbb006d08baa90f0
LinqKit Assembly: 1.1.9.0 File: 1.1.9.0 Info: 1.1.9.0
LinqKit.EntityFramework Assembly: 1.1.9.0 File: 1.1.9.0 Info: 1.1.9.0
Microsoft.AspNet.Identity.Core Assembly: 2.0.0.0 File: 2.2.1.40403.0
Microsoft.AspNet.Identity.EntityFramework Assembly: 2.0.0.0 File: 2.2.1.40403.0
Microsoft.AspNet.Identity.Owin Assembly: 2.0.0.0 File: 2.2.1.40403.0
Microsoft.Owin Assembly: 3.1.0.0 File: 3.1.60405.82 Info: 3.1.0
Microsoft.Owin.Security.Cookies Assembly: 3.1.0.0 File: 3.1.60405.82 Info: 3.1.0
Microsoft.Owin.Security Assembly: 3.1.0.0 File: 3.1.60405.82 Info: 3.1.0
Microsoft.Owin.Security.Facebook Assembly: 3.1.0.0 File: 3.1.60405.82 Info: 3.1.0
Microsoft.Owin.Security.Google Assembly: 3.1.0.0 File: 3.1.60405.82 Info: 3.1.0
Microsoft.Owin.Security.MicrosoftAccount Assembly: 3.1.0.0 File: 3.1.60405.82 Info: 3.1.0
Microsoft.Owin.Security.OAuth Assembly: 3.1.0.0 File: 3.1.60405.82 Info: 3.1.0
Microsoft.Owin.Security.Twitter Assembly: 3.1.0.0 File: 3.1.60405.82 Info: 3.1.0
Mono.Reflection Assembly: 1.1.0.0 File: 1.1.0.0
MultiSafepay Assembly: 0.4.0.0 File: 0.4.0
Newtonsoft.Json Assembly: 10.0.0.0 File: 10.0.2.20802
Owin Assembly: 1.0.0.0 File: 1.0
PagedList Assembly: 1.17.0.0 File: 1.17
PagedList.Mvc Assembly: 4.5.0.0 File: 4.5
PaymentGateways Assembly: 1.0.0.0 File: 1.0.0.0
protobuf-net Assembly: 2.1.0.0 File: 2.1.0 Info: 2.1.0
reCAPTCHA.MVC Assembly: 1.0.0.0 File: 1.0.0.0
System.Net.Http.Formatting Assembly: 5.2.3.0 File: 5.2.30128.0 Info: 5.2.3-30128 (0e974218e12a67d4b1f25422119e40cfe6953e46)
System.Web.Helpers Assembly: 3.0.0.0 File: 3.0.30128.0 Info: 3.0.3-30128 (0e974218e12a67d4b1f25422119e40cfe6953e46)
System.Web.Http Assembly: 5.2.3.0 File: 5.2.30128.0 Info: 5.2.3-30128 (0e974218e12a67d4b1f25422119e40cfe6953e46)
System.Web.Http.Owin Assembly: 5.2.3.0 File: 5.2.30128.0 Info: 5.2.3-30128 (0e974218e12a67d4b1f25422119e40cfe6953e46)
System.Web.Http.WebHost Assembly: 5.2.3.0 File: 5.2.30128.0 Info: 5.2.3-30128 (0e974218e12a67d4b1f25422119e40cfe6953e46)
System.Web.Razor Assembly: 3.0.0.0 File: 3.0.30128.0 Info: 3.0.3-30128 (0e974218e12a67d4b1f25422119e40cfe6953e46)
UtilityFuntions Assembly: 1.0.0.0 File: 1.0.0.0
WebGrease Assembly: 1.6.5135.21930
Website.Database Assembly: 1.0.0.0 File: 1.0.0.0
Website.Models Assembly: 1.0.0.0 File: 1.0.0.0
Website.Services Assembly: 1.0.0.0 File: 1.0.0.0
System.Xaml Assembly: 4.0.0.0 File: 4.6.1084.0 Info: 4.6.1084.0
System.Net.Http Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
SMDiagnostics Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.ServiceModel.Internals Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
Anonymously Hosted DynamicMethods Assembly Assembly: 0.0.0.0
System.Transactions Assembly: 4.0.0.0 File: 4.6.1080.0 Info: 4.6.1080.0
System.Numerics Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Data.OracleClient Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Data.Linq Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
System.Web.DataVisualization Assembly: 4.0.0.0 File: 4.6.1038.0 Info: 4.6.1038.0
EntityFrameworkDynamicProxies-Website.Models Assembly: 1.0.0.0