Can't view non-image files using imageresizer s3reader plugin - amazon-s3

I am attempting to use the ImageResizer s3Reader plugin to view non-image files (PDFs, ZIPs) using the ~/s3/ prefix. On my localhost this works wonderfully and as expected. However, as soon as I deploy this to my beta or production environment, I receive a 404 file not found error for all non-images. Using s3Reader with the prefix ~/s3/ to view images works fine on all three environments. I've triple-checked to make sure the files I am trying to access are on S3.
The only workaround I have found for this is to use the prefix http://s3.amazonaws.com/ , however the client has requested that this not be used because it is detrimental to SEO. The imageresizer website claims it is possible to use s3Reader for non-image files. Here is what my resizer.debug diagnostic returns:
Image resizer diagnostic sheet 5/17/2013 3:59:30 PM
1 Issues detected:
(Warning): To potentially see additional errors here, perform an image resize request.
You are using paid bundles: Performance Bundle, Cloud Bundle, Design Bundle
Registered plugins:
ImageResizer.Plugins.Basic.DefaultEncoder
ImageResizer.Plugins.Basic.NoCache
ImageResizer.Plugins.Basic.ClientCache
ImageResizer.Plugins.Basic.Diagnostic
ImageResizer.Plugins.Basic.SizeLimiting
ImageResizer.Plugins.DiskCache.DiskCache
ImageResizer.Plugins.S3Reader.S3Reader
ImageResizer.Plugins.WhitespaceTrimmer.WhitespaceTrimmerPlugin
ImageResizer.Plugins.AdvancedFilters.AdvancedFilters
ImageResizer.Plugins.Basic.Presets
ImageResizer.Plugins.SeamCarving.SeamCarvingPlugin
ImageResizer.Plugins.Watermark.WatermarkPlugin
ImageResizer.Plugins.MvcRoutingShim.MvcRoutingShimPlugin
Configuration:
<resizer>
<pipeline fakeExtensions=".ashx" />
<plugins>
<add name="DiskCache" />
<add name="S3Reader" buckets="subzerowolf" vpp="true" prefix="~/s3/" accessKeyId="[redacted]" secretAccessKey="[redacted]" />
<add name="WhitespaceTrimmer" />
<add name="AdvancedFilters" />
<add name="Presets" />
<add name="SeamCarving" />
<add name="Watermark" />
<add name="MvcRoutingShim" />
</plugins>
<diagnostics enableFor="AllHosts" />
<presets onlyAllowPresets="false">
<preset name="product-detail" settings="height=310;width=630;trim.threshold=80;trim.percentpadding=15" />
<preset name="category" settings="height=170;width=170" />
<preset name="catfallback" settings="height=310;width=630;trim.threshold=80;trim.percentpadding=15" />
<preset name="gallerythumb" settings="height=149;width=200;mode=crop;anchor=middlecenter;" />
<preset name="gallerylarge" settings="height=297;width=456;mode=crop;anchor=middlecenter;encoder=wic;quality=60" />
<preset name="gallerybg" settings="height=553;width=937;mode=crop;anchor=middlecenter;trim.threshold=80" />
<preset name="thumb" settings="height=138;width=138;mode=crop;anchor=middlecenter;encoder=wic;quality=60" />
<preset name="photodetail" settings="height=311;width=631;mode=crop;anchor=middlecenter;" />
<preset name="photodetailside" settings="height=50;width=50;mode=crop;anchor=middlecenter;" />
<preset name="zoomsm" settings="height=237;width=480;mode=crop;anchor=middlecenter;" />
<preset name="zoommed" settings="height=315;width=640;mode=crop;anchor=middlecenter;" />
<preset name="zoomlg" settings="height=505;width=1024;mode=crop;anchor=middlecenter;" />
<preset name="category-hero" settings="height=284;width=686;mode=crop;anchor=middlecenter;" />
<preset name="storypage-standard" settings="height=179;width=285;mode=crop;anchor=middlecenter;" />
<preset name="storypage-expanded" settings="height=585;width=877;mode=crop;anchor=middlecenter;" />
<preset name="storypage-interactive" settings="height=513;width=879;mode=crop;anchor=middlecenter;" />
<preset name="storypage-video" settings="height=397;width=879;mode=crop;anchor=middlecenter;" />
<preset name="storypage-gallery" settings="height=398;width=877;mode=crop;anchor=middlecenter;" />
<preset name="story-selector" settings="height=144;width=218;mode=crop;anchor=middlecenter;" />
<preset name="prod-list-single" settings="height=196;width=259;" />
<preset name="prod-list-double" settings="height=152;width=170;" />
<preset name="story-hero" settings="height=284;width=686;mode=crop;anchor=middlecenter;" />
<preset name="evidence-gallery" settings="height=398;width=877;mode=crop;anchor=middlecenter;" />
<preset name="accordian-image" settings="height=337;width=600;mode=crop;anchor=middlecenter;" />
<preset name="dlp-photo-preview" settings="height=400;width=600;mode=crop;anchor=middlecenter;" />
<preset name="feature-tooltip-image" settings="width=210;mode=crop;anchor=middlecenter;" />
<preset name="dlp-hero-gallery" settings="height=302;width=604;mode=crop;anchor=middlecenter;" />
<preset name="dlp-edu-block" settings="maxheight=280;mode=crop;anchor=middlecenter;trim.threshold=80;trim.percentpadding=5" />
<preset name="dlp-product-block" settings="maxheight=125;mode=crop;anchor=middlecenter;trim.threshold=80;trim.percentpadding=15" />
</presets>
<watermarks>
<text name="gmaplabel-single" text="#{num}" color="666666" fontSize="10" right="46%" bottom="52%" relativeTo="image" drawAs="overlay" />
<text name="gmaplabel-doubles" text="#{num}" color="666666" fontSize="10" right="39%" bottom="52%" relativeTo="image" drawAs="overlay" />
</watermarks>
</resizer>
Accepted querystring keys:
quality, format, thumbnail, trim.percentpadding, trim.threshold, blur, sharpen, a.blur, a.sharpen, a.oilpainting, a.removenoise, a.sobel, a.threshold, a.canny, a.sepia, a.equalize, a.posterize, a.contrast, a.brightness, a.saturation, a.truncate, a.balancewhite, a.balancethreshold, a.featheredges, preset, carve, watermark, maxwidth, maxheight, width, height, w, h, scale, stretch, crop, cropxunits, cropyunits, page, bgcolor, rotate, flip, sourceFlip, sFlip, sRotate, borderWidth, borderColor, paddingWidth, paddingColor, ignoreicc, frame, useresizingpipeline, cache, process, margin, anchor, dpi, mode, zoom,
Accepted file extensions:
bmp, gif, exif, png, tif, tiff, tff, jpg, jpeg, jpe, jif, jfif, jfi,
Environment information:
Running Microsoft-IIS/7.5 on Microsoft Windows NT 6.1.7601 Service Pack 1 and CLR 2.0.50727.5448
Trust level: Unrestricted
OS bitness: AMD64
Executing assembly: c:\windows\system32\inetsrv\w3wp.exe
IntegratedPipeline: True
Loaded assemblies:
mscorlib Assembly: 2.0.0.0 File: 2.0.50727.5448 Info: 2.0.50727.5448
System.Web Assembly: 2.0.0.0 File: 2.0.50727.5710 Info: 2.0.50727.5710
System Assembly: 2.0.0.0 File: 2.0.50727.5453 Info: 2.0.50727.5453
System.Xml Assembly: 2.0.0.0 File: 2.0.50727.5420 Info: 2.0.50727.5420
System.Configuration Assembly: 2.0.0.0 File: 2.0.50727.5420 Info: 2.0.50727.5420
System.Web.RegularExpressions Assembly: 2.0.0.0 File: 2.0.50727.4927 Info: 2.0.50727.4927
System.Data Assembly: 2.0.0.0 File: 2.0.50727.5420 Info: 2.0.50727.5420
System.Transactions Assembly: 2.0.0.0 File: 2.0.50727.4927 Info: 2.0.50727.4927
System.EnterpriseServices Assembly: 2.0.0.0 File: 2.0.50727.5420 Info: 2.0.50727.5420
System.Design Assembly: 2.0.0.0 File: 2.0.50727.5420 Info: 2.0.50727.5420
System.Drawing Assembly: 2.0.0.0 File: 2.0.50727.5458 Info: 2.0.50727.5458
Microsoft.JScript Assembly: 8.0.0.0 File: 8.0.50727.4927 Info: 8.0.50727.4927
App_global.asax.-eux7gcy Assembly: 0.0.0.0
SubZero.Web Assembly: 0.0.0.0
System.Web.Extensions Assembly: 3.5.0.0 File: 3.5.30729.5446 Info: 3.5.30729.5446
System.Web.Abstractions Assembly: 3.5.0.0 File: 3.5.30729.5420 Info: 3.5.30729.5420
System.Core Assembly: 3.5.0.0 File: 3.5.30729.5420 Info: 3.5.30729.5420
System.Web.Routing Assembly: 3.5.0.0 File: 3.5.30729.5420 Info: 3.5.30729.5420
System.Web.Services Assembly: 2.0.0.0 File: 2.0.50727.5420 Info: 2.0.50727.5420
System.Web.Mobile Assembly: 2.0.0.0 File: 2.0.50727.5420 Info: 2.0.50727.5420
AForge Assembly: 2.2.4.0 File: 2.2.4.0
AForge.Imaging Assembly: 2.2.4.0 File: 2.2.4.0
AForge.Math Assembly: 2.2.4.0 File: 2.2.4.0
AjaxControlToolkit Assembly: 3.0.20820.19484 File: 3.0.20820.0
AjaxMin Assembly: 4.42.4387.23950
Antlr3.Runtime Assembly: 3.1.0.39271
AutoMapper Assembly: 0.4.0.126 File: 0.4.0.126 Info: 0.4.0.126
AWSSDK Assembly: 1.5.15.0 File: 1.5.15.0
Castle.Core Assembly: 1.1.0.0 File: 1.1.0.0 Info: 1.1.0.0
Castle.DynamicProxy2 Assembly: 2.1.0.0 File: 2.1.0.0 Info: 2.1.0.0
Castle.MicroKernel Assembly: 2.0.0.0 File: 2.0.0.0 Info: 2.0.0.0
Castle.Windsor Assembly: 2.0.0.0 File: 2.0.0.0 Info: 2.0.0.0
CommonServiceLocator.WindsorAdapter Assembly: 1.0.0.0 File: 1.0.0.0
ConvertToExcel Assembly: 1.0.0.0 File: 1.0.0.0
dbCommand Assembly: 1.0.2152.20583
dotless.Core Assembly: 1.2.2.0 File: 1.2.2.0 Info: 1.2.2.0
DynamicSorting Assembly: 1.1.0.0 File: 1.0.0.0
EcmaScript.NET.modified Assembly: 0.1.1.0
FluentNHibernate Assembly: 1.0.0.594 Info: 1.0.0.594
FluentValidation Assembly: 1.2.0.0 File: 1.2.0.0
FluentValidation.Mvc Assembly: 1.2.0.0 File: 1.2.0.0
Gorilla.Utilities Assembly: 1.0.0.0 File: 1.0.0.0
Iesi.Collections Assembly: 1.0.1.0 File: 2.1.1.4000 Info: 1.0
ImageResizer Assembly: 3.3.3.123 File: 3.3.3.123 Info: 3-3-3 Commit: c368317
ImageResizer.Mvc Assembly: 3.3.3.123 File: 3.3.3.123 Info: 3-3-3 Commit: c368317
ImageResizer.Plugins.AdvancedFilters Assembly: 3.3.3.123 File: 3.3.3.123 Info: 3-3-3 Commit: c368317
ImageResizer.Plugins.DiskCache Assembly: 3.3.3.123 File: 3.3.3.123 Info: 3-3-3 Commit: c368317
ImageResizer.Plugins.S3Reader Assembly: 3.3.3.123 File: 3.3.3.123 Info: 3-3-3 Commit: c368317
ImageResizer.Plugins.SeamCarving Assembly: 3.3.3.123 File: 3.3.3.123 Info: 3-3-3 Commit: c368317
ImageResizer.Plugins.Watermark Assembly: 3.3.3.123 File: 3.3.3.123 Info: 3-3-3 Commit: c368317
ImageResizer.Plugins.WhitespaceTrimmer Assembly: 3.3.3.123 File: 3.3.3.123 Info: 3-3-3 Commit: c368317
ImageResizer.Plugins.Wic Assembly: 3.3.3.123 File: 3.3.3.123 Info: 3-3-3 Commit: c368317
Inflector.Net Assembly: 0.0.0.0
InternetModel Assembly: 1.0.0.0 File: 1.0.0.0
IP2Location Assembly: 1.6.2.18300
itextsharp Assembly: 3.1.8.0
JobOpening Assembly: 1.0.0.0 File: 1.0.0.0
Jurassic Assembly: 2.1.0.0
KDC Assembly: 1.0.0.0 File: 1.0.0.0
KDC2008 Assembly: 1.0.0.0 File: 1.0.0.0
LitS3 Assembly: 1.0.1.0 File: 1.0.1.0
LocatorModel Assembly: 1.0.0.0 File: 1.0.0.0
log4net Assembly: 1.2.10.0 File: 1.2.10.0 Info: 1.2
MessageMedia Assembly: 2.2.1.265 File: 2.2.1.265
Microsoft.Practices.ServiceLocation Assembly: 1.0.0.0 File: 1.0.0.0
Microsoft.Web.Mvc Assembly: 1.0.0.0 File: 1.0.40310.0
MvcContrib.Castle Assembly: 1.0.0.99 File: 1.0.0.99 Info: 1.0.0.99
MvcContrib Assembly: 1.5.996.0 File: 1.5.996.0 Info: 1.5.996.0
MvcContrib.FluentHtml Assembly: 1.0.0.99 File: 1.0.0.99 Info: 1.0.0.99
Newtonsoft.Json Assembly: 3.5.0.0 File: 3.5.0.0
NHibernate.ByteCode.Castle Assembly: 2.1.1.4000 File: 2.1.1.4000 Info: 2.1.1.4000
NHibernate Assembly: 2.1.1.4000 File: 2.1.1.4000 Info: 2.1.1.4000
NHibernate.Validator Assembly: 1.2.0.2003 File: 1.2.0.2003 Info: 1.2.0.2003
NLog Assembly: 1.0.0.0
Payflow_dotNET Assembly: 4.3.0.0
PostSharp.Core Assembly: 1.0.11.424
PostSharp.Core.XmlSerializers Assembly: 1.0.11.424
PostSharp.Laos Assembly: 1.0.11.424
PostSharp.Laos.Weaver Assembly: 1.0.11.416
PostSharp.Public Assembly: 1.0.11.424
PublicSiteDAL Assembly: 1.0.0.0 File: 1.0.0.0
SharpArch.Core Assembly: 1.0.0.0 File: 1.0.0 Info: 1.0.0
SharpArch.Core.NHibernateValidator Assembly: 1.0.0.0 File: 1.0.0 Info: 1.0.0
SharpArch.Data Assembly: 1.0.0.0 File: 1.0.0 Info: 1.0.0
SharpArch.Web.Castle Assembly: 1.0.0.0 File: 1.0.0 Info: 1.0.0
SharpArch.Web Assembly: 1.0.0.0 File: 1.0.0 Info: 1.0.0
SquishIt.Framework Assembly: 0.8.5.0 File: 0.8.5.0
StandardDAC Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.ApplicationServices Assembly: 1.0.0.0 File: 1.0.0.0 Info: 1.0.0.0
SubZero.App_Code Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.Common.Business Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.Common.DataAccess Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.Common.Entities Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.Common.ViewModels Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.Core Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.Data Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.Public.Business Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.Public.DataAccess Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.Public.Entities Assembly: 1.0.0.0 File: 1.0.0.0
SubZero.Web.Controllers Assembly: 1.0.0.0 File: 1.0.0.0 Info: 1.0.0.0
sw.Common.Application Assembly: 1.0.0.0 File: 1.0.0.0
sw.Common.Aspects Assembly: 1.0.0.0 File: 1.0.0.0
sw.Common.Patterns Assembly: 1.0.0.0 File: 1.0.0.0
sw.Web.Library.TradePanelSpecs Assembly: 1.0.0.0 File: 1.0.0.0
WorldDomination.Net.IPAddressExtensions Assembly: 1.1.0.0 File: 1.1.0.0
Yahoo.Yui.Compressor Assembly: 1.6.0.2 File: 1.6.0.2
System.Runtime.Serialization Assembly: 3.0.0.0 File: 3.0.4506.5420 Info: 3.0.4506.5420
System.IdentityModel Assembly: 3.0.0.0 File: 3.0.4506.5420 Info: 3.0.4506.5420
System.ServiceModel Assembly: 3.0.0.0 File: 3.0.4506.5420 Info: 3.0.4506.5420
System.ServiceModel.Web Assembly: 3.5.0.0 File: 3.5.594.5420 Info: 3.5.594.5420
System.WorkflowServices Assembly: 3.5.0.0 File: 3.5.594.5420 Info: 3.5.594.5420
System.Messaging Assembly: 2.0.0.0 File: 2.0.50727.5420 Info: 2.0.50727.5420
System.Windows.Forms Assembly: 2.0.0.0 File: 2.0.50727.5446 Info: 2.0.50727.5446
ISymWrapper Assembly: 2.0.0.0 File: 2.0.50727.5420 Info: 2.0.50727.5420
System.Web.Mvc Assembly: 1.0.0.0 File: 1.0.40310.0
System.Data.DataSetExtensions Assembly: 3.5.0.0 File: 3.5.30729.5420 Info: 3.5.30729.5420
System.Xml.Linq Assembly: 3.5.0.0 File: 3.5.30729.5420 Info: 3.5.30729.5420
System.Data.Linq Assembly: 3.5.0.0 File: 3.5.30729.5420 Info: 3.5.30729.5420
Anonymously Hosted DynamicMethods Assembly Assembly: 0.0.0.0
eotle1vi Assembly: 2.1.1.4000
q6ywobas Assembly: 2.1.1.4000
App_Web_vgohdmhx Assembly: 0.0.0.0
App_Web__1nwwnf8 Assembly: 0.0.0.0
App_Web_-v1w9clr Assembly: 0.0.0.0
App_Web_hqeztat1 Assembly: 0.0.0.0
Microsoft.VisualBasic Assembly: 8.0.0.0 File: 8.0.50727.5420 Info: 8.0.50727.5420
The following plugin assemblies are loaded but do not seem to be in use. You should remove them (and especially their dependencies (unless used elsewhere)) from the /bin folder to improve application load times:
ImageResizer.Plugins.Wic Assembly: 3.3.3.123 File: 3.3.3.123 Info: 3-3-3 Commit: c368317
Reference list of plugin dependencies - so you know what additional dlls to remove when removing a plugin. (may not be up-to-date, see plugin docs):
The FreeImage plugin has the following dependencies: FreeImage.dll and FreeImageNET.dll
The Logging plugin depends on: NLog.dll
The AdvancedFilters, RedEye, and WhitespaceTrimmer plugins depend on: AForge.dll, AForge.Math.dll, and AForge.Imaging.dll
The PsdReader and PsdComposer plugins depend on: PsdFile.dll
The S3Reader plugin depends on: LitS3.dll
The BatchZipper plugin depends on: Ionic.Zip.Reduced.dll
The PdfRenderer plugin depends on gsdll32.dll or gdsll32.dll
The RedEye plugin depends on several dozen files... see the plugin docs.
At this point I am stumped. I seem to have configured s3Reader properly, and I know it has the capability to read files because I can view them on localhost.

When something works on localhost, but not production, you know it's a server configuration problem.
Do you have RAMMFAR enabled? If IIS is not loading ASP.NET for all requests, it won't get non-image files for sure.

Related

Imageresizer: Red dot on images although I have purchased a license

I've purchase a Performance license and added it to web.config, but still have the red dot. Not sure if this is because I registered it for domain.com but am using it on www.domain.com
The diagnostic page tells me I have no license. Here's the output. Any idea what I'm doing wrong?
0 Issues detected:
Assembly use report:
You are using plugins and assemblies from the V4 Performance Edition.
----------------
License keys
You do not have any license keys installed.
----------------
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.DiskCache.DiskCache
ImageResizer.Plugins.LicenseVerifier.LicenseEnforcer`1[ImageResizer.Plugins.DiskCache.DiskCache]
Configuration:
<resizer>
<pipeline fakeExtensions=".ashx" defaultCommands="autorotate.default=true" />
<diagnostics enableFor="allhosts" />
<licences>
<license>
tspc.co.uk(R4Performance includes R4Performance):RG9tY--lotsmorelicensestuff==
</license>
</licences>
<plugins>
<add name="DiskCache" />
</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/8.5 on Microsoft Windows NT 6.3.9600.0 and CLR 4.0.30319.34014
Trust level: Unrestricted
OS bitness: AMD64
Executing assembly: c:\windows\system32\inetsrv\w3wp.exe
IntegratedPipeline: True
Installed HttpModules:
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)
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)
ImageResizer.InterceptModule, ImageResizer, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null (under keyImageResizingModule)
Loaded assemblies:
mscorlib Assembly: 4.0.0.0 File: 4.0.30319.34014 Info: 4.0.30319.34014
System.Web Assembly: 4.0.0.0 File: 4.0.30319.34274 Info: 4.0.30319.34274
System Assembly: 4.0.0.0 File: 4.0.30319.34239 Info: 4.0.30319.34239
System.Core Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Configuration Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Xml Assembly: 4.0.0.0 File: 4.0.30319.34230 Info: 4.0.30319.34230
System.Web.ApplicationServices Assembly: 4.0.0.0 File: 4.0.30319.34274 Info: 4.0.30319.34274
Microsoft.Build.Utilities.v4.0 Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Runtime.Caching Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Data Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Web.RegularExpressions Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
Microsoft.JScript Assembly: 10.0.0.0 File: 12.0.20806.33440 Info: 12.0.20806.33440
System.Web.Extensions Assembly: 4.0.0.0 File: 4.0.30319.34274 Info: 4.0.30319.34274
Microsoft.CSharp Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Web.Services Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Drawing Assembly: 4.0.0.0 File: 4.0.30319.34262 Info: 4.0.30319.34262
System.EnterpriseServices Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.IdentityModel Assembly: 4.0.0.0 File: 4.0.30319.34230 Info: 4.0.30319.34230
System.Runtime.Serialization Assembly: 4.0.0.0 File: 4.0.30319.34230 Info: 4.0.30319.34230
System.ServiceModel Assembly: 4.0.0.0 File: 4.0.30319.34230 Info: 4.0.30319.34230
System.ServiceModel.Activation Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.ServiceModel.Web Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Activities Assembly: 4.0.0.0 File: 4.0.30319.34230 Info: 4.0.30319.34230
System.ServiceModel.Activities Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.WorkflowServices Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Data.DataSetExtensions Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Xml.Linq Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.ComponentModel.DataAnnotations Assembly: 4.0.0.0 File: 4.0.30319.34262 Info: 4.0.30319.34262
System.Web.DynamicData Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
ImageResizer Assembly: 4.0.0.0 File: 4.0.5.942 Info: 4.0.5 Commit: 3d5572f812a7c9252402583ffbb006d08baa90f0
ImageResizer.Plugins.DiskCache Assembly: 4.0.0.0 File: 4.0.5.942 Info: 4.0.5 Commit: 3d5572f812a7c9252402583ffbb006d08baa90f0
Reboot IIS using iisreset. The diagnostics page always fetches the latest info from Web.config, but the ASP.NET runtime and IIS often fail to detect file changes.
Update: I missed it!
Change <licences> to <licenses>, THEN reboot.
You were correct in purchasing the root domain; subdomains are included.

ImageResizer license not working under Cloudfront CDN

I own a performance license for ImageResizing for the domain *.com
The domain is pointing to Cloudfront CDN which then points to a load balancer which has servers under it. Because of this, the requests getting to our server is from the domain *.us-east-1.elb.amazonaws.com which makes the license invalid. Do anyone know how we can overcome this issue?
I own a performance license for ImageResizing for the domain *.com
The domain is pointing to Cloudfront CDN which then points to a load balancer which has servers under it. Because of this, the requests getting to our server is from the domain *.us-east-1.elb.amazonaws.com which makes the license invalid. Do anyone know how we can overcome this issue?
Image resizer diagnostic sheet ***.com 10/29/2015 9:43:26 AM
2 Issues detected:
resizer configuration(Error): No license found for domain ***.us-east-1.elb.amazonaws.com - features installed: R4Performance or R4BlobProviders
(Warning): NoCache is only for development usage, and cannot scale to production use.
Add DiskCache or CloudFront for production use
Assembly use report:
You are using plugins and assemblies from the V4 Performance Edition.
----------------
License keys
List of installed domain licenses:
***.com => R4Performance
----------------
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.S3Reader2.S3Reader2
ImageResizer.Plugins.LicenseVerifier.LicenseEnforcer`1[ImageResizer.Storage.BlobProviderBase]
ImageResizer.Plugins.AnimatedGifs.AnimatedGifs
ImageResizer.Plugins.PrettyGifs.PrettyGifs
ImageResizer.Plugins.RemoteReader.RemoteReaderPlugin
Configuration:
<resizer>
<pipeline fakeExtensions=".ashx" />
<remotereader signingKey="" allowAllSignedRequests="true" allowRedirects="5">
<allow domain="*" />
</remotereader>
<plugins>
<add name="S3Reader2" vpp="true" buckets="***-uploads" prefix="~/s3/" checkForModifiedFiles="false" useSsl="false" accessKeyId="" secretAccessKey="" useSubdomains="false" region="us-west-1" />
<add name="AnimatedGifs" />
<add name="PrettyGifs" />
</plugins>
<clientcache minutes="1440" />
<licenses>
<license>
***.com(R4Performance includes R4Performance)
:***
</license>
</licenses>
</resizer>
Accepted querystring keys:
quality, format, thumbnail, colors, dither, 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/8.5 on Microsoft Windows NT 6.3.9600.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)
Loaded assemblies:
mscorlib Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Web Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Core Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Configuration Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Xml Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Web.ApplicationServices Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Runtime.Caching Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
Microsoft.Build.Utilities.v4.0 Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
Microsoft.JScript Assembly: 10.0.0.0 File: 14.0.81.0 Info: 14.0.81.0
App_global.asax.9b8m6vn6 Assembly: 0.0.0.0
***.Shared Assembly: 1.0.0.0 File: 1.0.0.0
ImageResizer.Plugins.RemoteReader Assembly: 4.0.0.0 File: 4.0.4.934 Info: 4.0.4 Commit: 9f75f3637f9b00eb64acf004adaa066b47585638
System.Web.Extensions Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
Microsoft.CSharp Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Data Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Web.Services Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Drawing Assembly: 4.0.0.0 File: 4.6.93.0 Info: 4.6.93.0
System.EnterpriseServices Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.IdentityModel Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Runtime.Serialization Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.ServiceModel Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.ServiceModel.Activation Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.ServiceModel.Web Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Activities Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.ServiceModel.Activities Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.WorkflowServices Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Data.DataSetExtensions Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.Xml.Linq Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
System.ComponentModel.DataAnnotations Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
System.Web.DynamicData Assembly: 4.0.0.0 File: 4.0.30319.33440 Info: 4.0.30319.33440
AWSSDK.Core Assembly: 3.1.0.0 File: 3.1.3.2
AWSSDK.S3 Assembly: 3.1.0.0 File: 3.1.3.3
***.Configuration Assembly: 1.0.0.0 File: 1.0.0.0
***.Extensions Assembly: 1.0.0.0 File: 1.0.0.0
ImageResizer Assembly: 4.0.0.0 File: 4.0.4.934 Info: 4.0.4 Commit: 9f75f3637f9b00eb64acf004adaa066b47585638
ImageResizer.Plugins.AnimatedGifs Assembly: 4.0.0.0 File: 4.0.4.934 Info: 4.0.4 Commit: 9f75f3637f9b00eb64acf004adaa066b47585638
ImageResizer.Plugins.PrettyGifs Assembly: 4.0.0.0 File: 4.0.4.934 Info: 4.0.4 Commit: 9f75f3637f9b00eb64acf004adaa066b47585638
ImageResizer.Plugins.S3Reader2 Assembly: 4.0.0.0 File: 4.0.4.934 Info: 4.0.4 Commit: 9f75f3637f9b00eb64acf004adaa066b47585638
ImageResizer.Storage Assembly: 4.0.0.0 File: 4.0.4.934 Info: 4.0.4 Commit: 9f75f3637f9b00eb64acf004adaa066b47585638
log4net Assembly: 1.2.13.0 File: 1.2.13.0 Info: 1.2
Newtonsoft.Json Assembly: 7.0.0.0 File: 7.0.1.18622
ServiceStack.Interfaces Assembly: 4.0.0.0 File: 4.0.46.0
ServiceStack.Text Assembly: 4.0.46.0 File: 4.0.46.0
System.Numerics Assembly: 4.0.0.0 File: 4.6.81.0 Info: 4.6.81.0
Is there a custom name? I.e, myinstance.us-east-1.elb.amazonaws.com? If so, this would be the domain you would register the license key under. ImageResizer can't know what domain name it's published under unless that name is transmitted to it via HTTP as part of the HOST header. (Or, another header, if the original domain is forwarded somehow - we could add a fallback path - if so, open an issue (or PR) on Github).
You might consider a DRM-free license (Like Elite) to reduce the long-term hassle associated with changing load balancers and configurations. We don't suggest domain-restricted licenses for complex setups, particularly at a scale that requires load balancing.
Also, keep in mind that it is 100% open-source (half AGPL 3, half Apache 2), and you're legally free to strip the DRM out and make your own builds, even under the commercial license terms. We really don't mind.

ImageResizer on Mono

I get the following error when using the ImageResizer module on Mono in Linux:
Server Error in '/' Application
Argument is out of range. Parameter name: date
Description: HTTP 500. Error processing request.
Stack Trace:
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: date
at System.Web.HttpCachePolicy.SetLastModified (DateTime date) [0x00046] in /build/src/mono-2.10.8/mcs/class/System.Web/System.Web/HttpCachePolicy.cs:225
at ImageResizer.Caching.ResponseHeaders.DefaultApplyToResponseMethod (IResponseHeaders headers, System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at ImageResizer.Plugins.Basic.NoCacheHandler.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0
at System.Web.HttpApplication+<Pipeline>c__Iterator6.MoveNext () [0x00dad] in /build/src/mono-2.10.8/mcs/class/System.Web/System.Web/HttpApplication.cs:1368
at System.Web.HttpApplication.Tick () [0x00000] in /build/src/mono-2.10.8/mcs/class/System.Web/System.Web/HttpApplication.cs:932
Version information: Mono Runtime Version: 2.10.8 (tarball Sat Dec 31 02:07:23 UTC 2011); ASP.NET Version: 4.0.30319.1
Here is the debug sheet:
Image resizer diagnostic sheet 07/09/2012 14:15:41
3 Issues detected:
(Warning): To potentially see additional errors here, perform an image resize request.
(Warning): UrlAuthorizationModule.CheckUrlAccessForPrincipal is not supported on this runtime (are you running Mono?)
It may be possible for users to bypass UrlAuthorization rules you have defined for your website, and access images that would otherwise be protected. If you do not use UrlAuthorization rules, this should not be a concern. You may also re-implement your security rules by handling the Config.Current.Pipeline.AuthorizeImage event.
(Warning): NoCache is only for development usage, and cannot scale to production use.
Add DiskCache or CloudFront for production use
You are not using any paid bundles.
Registered plugins:
ImageResizer.Plugins.Basic.DefaultEncoder
ImageResizer.Plugins.Basic.NoCache
ImageResizer.Plugins.Basic.ClientCache
ImageResizer.Plugins.Basic.Diagnostic
ImageResizer.Plugins.Basic.SizeLimiting
ImageResizer.Plugins.MvcRoutingShim.MvcRoutingShimPlugin
Configuration:
<resizer>
<pipeline fakeExtensions=".ashx" />
<plugins>
<add name="MvcRoutingShim" />
</plugins>
</resizer>
Accepted querystring keys:
quality, format, thumbnail, maxwidth, maxheight, width, height, w, h, scale, stretch, crop, cropxunits, cropyunits, page, bgcolor, rotate, flip, sourceFlip, sFlip, sRotate, borderWidth, borderColor, paddingWidth, paddingColor, ignoreicc, frame, useresizingpipeline, cache, process, margin, anchor, dpi, mode, zoom,
Accepted file extensions:
bmp, gif, exif, png, tif, tiff, tff, jpg, jpeg, jpe, jif, jfif, jfi,
Environment information:
Running Apache on Unix 2.6.39.2 and CLR 4.0.30319.1
Trust level: Unrestricted
OS bitness:
Executing assembly: /usr/bin/mono
IntegratedPipeline: False
Loaded assemblies:
System.Runtime.Caching Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Messaging Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Transactions Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
Mono.Data.Tds Assembly: 4.0.0.0
Mono.Security Assembly: 4.0.0.0
System.Security Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
Mono.CSharp Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
App_global.asax_199cffe9 Assembly: 0.0.0.0
Microsoft.Web.Infrastructure Assembly: 1.0.0.0 File: 1.0.20105.407
dotless.Core Assembly: 1.3.0.3 File: 1.3.0.3 Info: 1.3.0.3
System.Web.WebPages.Razor Assembly: 1.0.0.0 File: 1.0.20105.407
System.Web.WebPages.Deployment Assembly: 1.0.0.0 File: 1.0.20105.407
System.Web.Razor Assembly: 1.0.0.0 File: 1.0.20105.407
ImageResizer Assembly: 3.2.3.302 File: 3.2.3.302 Info: 3-2-beta-3 Commit: 245e873
ImageResizer.Mvc Assembly: 3.2.3.302 File: 3.2.3.302 Info: 3-2-beta-3 Commit: 245e873
System.Web.WebPages Assembly: 1.0.0.0 File: 1.0.20105.407
System.Web.Mvc Assembly: 3.0.0.0 File: 3.0.20105.0
System.Web.Routing Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.Helpers Assembly: 1.0.0.0 File: 1.0.20105.407
System.Web.Abstractions Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.ApplicationServices Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Data.Linq Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.DynamicData Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.ComponentModel.DataAnnotations Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Xml.Linq Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Data.DataSetExtensions Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.Extensions Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Core Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.ServiceModel.Web Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 3.5.594.0
System.ServiceModel Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Xaml Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Runtime.Serialization Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.IdentityModel Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.EnterpriseServices Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Drawing Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.Services Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Data Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
Microsoft.CSharp Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
Mono.Posix Assembly: 4.0.0.0
Mono.WebServer2 Assembly: 0.4.0.0
mod-mono-server4 Assembly: 2.10.2.0
Mono.Web Assembly: 4.0.0.0 Info: 0.0.0.1
System.Xml Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Configuration Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web Assembly: 4.0.0.0 File: 4.0.0.0 Info: 0.0.0.1
mscorlib Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
Any idea what could be going wrong here?
This is technically a bug in Mono - Both .NET 2.0 and .NET 4.0 convert the date to universal time before performing the conversion, while mono compares it to the local server time, failing to even normalize the two variables to ensure they have matching time zones.
Mono See code
public void SetLastModified (DateTime date)
{
if (date > DateTime.Now)
throw new ArgumentOutOfRangeException ("date");
if (have_last_modified && date < last_modified)
return;
have_last_modified = true;
last_modified = date;
}
.NET (both V2 and V4) (Use ILSpy, search HttpCachePolicy with System.Web loaded)
Or, click this link to see the disassembly.
Psuedocode for SetLastModified(DateTime date):
Convert date to universal time.
Round datetime down to the nearest multiple of 10,000,000 ticks
Verify that value is less than DateTime.UtcNow, and throw an exception if it's not.
If the local copy of the value has been set before and is 'newer' than this value, leave it alone.
Otherwise set the local copy of the value to the universal time version of the parameter.
Calling code (ImageResizer), /Core/Caching/ResponseHeaders.cs
//Sets the Last-Modifed: header
//The check against the current time is because files served from another server may have a modified date in the future, if the clocks are not synchronized.
//ASP.NET incorrectly blocks an future modified date from being sent, with an ArgumentOutOfRangeException
DateTime utc = headers.LastModified.ToUniversalTime();
if (utc != DateTime.MinValue && utc < DateTime.UtcNow) {
context.Response.Cache.SetLastModified(utc);
}
Finding a workaround to this that won't break something isn't very simple. MS SQL provides LastModified values in un-specified time zones, while filesystems provide UTC but can be in the future if they're from a remote server.
Since incoming DateTime values often don't include a timezone flag, normalization is very important.
Converting to UTC, testing, converting back to local, testing, then assigning might be a valid workaround.
I suggest editing /Core/Caching/ResponseHeaders.cs, method DefaultApplyToResponseMethod to use the following statement
if (utc != DateTime.MinValue && utc < DateTime.UtcNow && utc.ToLocalTime() < DateTime.Now) {
context.Response.Cache.SetLastModified(utc.ToLocalTime());
}
Please let me see if you notice a flaw in the logic; if I it works for you and passes the beta test it might be integrated into a future release.

ImageResizer showing no errors, but not working on IIS6

I just installed imageresizer on IIS6 .NET2 and downloaded the JCropExample2 sample project. I get no errors, but a: the images do not resize on page load and b: the cropping does not work. No errors are shown. I am new to .NET, so really not sure what I have missed??
ImageResizer Debug:
2 Issues detected:
(Warning): To potentially see additional errors here, perform an image resize request.
(Warning): NoCache is only for development usage, and cannot scale to production use.
Add DiskCache or CloudFront for production use
You are not using any paid bundles.
Registered plugins:
ImageResizer.Plugins.Basic.DefaultEncoder
ImageResizer.Plugins.Basic.NoCache
ImageResizer.Plugins.Basic.ClientCache
ImageResizer.Plugins.Basic.Diagnostic
ImageResizer.Plugins.Basic.SizeLimiting
Configuration:
<resizer>
<pipeline fakeExtensions=".ashx" />
<plugins />
</resizer>
Accepted querystring keys:
quality, format, thumbnail, maxwidth, maxheight, width, height, w, h, scale, stretch, crop, cropxunits, cropyunits, page, bgcolor, rotate, flip, sourceFlip, sFlip, sRotate, borderWidth, borderColor, paddingWidth, paddingColor, ignoreicc, frame, useresizingpipeline, cache, process, margin, anchor, dpi, mode, zoom,
Accepted file extensions:
bmp, gif, exif, png, tif, tiff, tff, jpg, jpeg, jpe, jif, jfif, jfi,
Environment information:
Running Microsoft-IIS/6.0 on Microsoft Windows NT 5.2.3790 Service Pack 2 and CLR 2.0.50727.3634
Trust level: Unrestricted
OS bitness: x86
Executing assembly: c:\windows\system32\inetsrv\w3wp.exe
IntegratedPipeline: False
Loaded assemblies:
mscorlib Assembly: 2.0.0.0 File: 2.0.50727.3634 Info: 2.0.50727.3634
System.Web Assembly: 2.0.0.0 File: 2.0.50727.3634 Info: 2.0.50727.3634
System Assembly: 2.0.0.0 File: 2.0.50727.3634 Info: 2.0.50727.3634
System.Xml Assembly: 2.0.0.0 File: 2.0.50727.3082 Info: 2.0.50727.3082
System.Configuration Assembly: 2.0.0.0 File: 2.0.50727.3053 Info: 2.0.50727.3053
System.Data Assembly: 2.0.0.0 File: 2.0.50727.3053 Info: 2.0.50727.3053
System.Web.RegularExpressions Assembly: 2.0.0.0 File: 2.0.50727.3053 Info: 2.0.50727.3053
Microsoft.JScript Assembly: 8.0.0.0 File: 8.0.50727.3053 Info: 8.0.50727.3053
System.Web.Mobile Assembly: 2.0.0.0 File: 2.0.50727.3053 Info: 2.0.50727.3053
System.ServiceModel Assembly: 3.0.0.0 File: 3.0.4506.3636 Info: 3.0.4506.3636
System.Web.Services Assembly: 2.0.0.0 File: 2.0.50727.3053 Info: 2.0.50727.3053
System.Drawing Assembly: 2.0.0.0 File: 2.0.50727.3639 Info: 2.0.50727.3639
System.EnterpriseServices Assembly: 2.0.0.0 File: 2.0.50727.3053 Info: 2.0.50727.3053
ImageResizer Assembly: 3.2.3.302 File: 3.2.3.302 Info: 3-2-beta-3 Commit: 245e873
System.ServiceModel.Web Assembly: 3.5.0.0 File: 3.5.594.1152 Info: 3.5.594.1152
System.WorkflowServices Assembly: 3.5.0.0 File: 3.5.594.1152 Info: 3.5.594.1152
System.Runtime.Serialization Assembly: 3.0.0.0 File: 3.0.4506.3636 Info: 3.0.4506.3636
System.IdentityModel Assembly: 3.0.0.0 File: 3.0.4506.3636 Info: 3.0.4506.3636
SMDiagnostics Assembly: 3.0.0.0 File: 3.0.4506.3636 Info: 3.0.4506.3636
It's working fine. You failed to read the step 3 of 3 on the homepage
<!-- Unless you (a) use Integrated mode, or (b) map all reqeusts to ASP.NET,
you'll need to add .ashx to your image URLs: image.jpg.ashx?width=200&height=20 -->
<pipeline fakeExtensions=".ashx" />
As you're using IIS6, which does not have Integrated mode, you have to use the .jpg.ashx syntax.
http://resizer.puremobi.com/JCropExample2/fountain-small.jpg.ashx?width=400

VirtualFolder plugin does not seem to work in Resizer 3.2.2

When I call the url http://localhost:15312/images/test.png?width=100 in Visual Studio Web server (I also tried Webmatrix) I get:
Source may only be an instance of string, VirtualFile, IVirtualBitmapFile, HttpPostedFile, HttpPostedFileBase, Bitmap, Image, or Stream.
Parameter name: source
Output of /resizer.debug:
Image resizer diagnostic sheet 2012-06-30 12:51:10
2 Issues detected:
(Warning): NoCache is only for development usage, and cannot scale to production use.
Add DiskCache or CloudFront for production use
(Warning): Potentially incompatible ImageResizer assemblies were detected.
Please make sure all ImageResizer assemblies are from the same version. Compatibility issues are possible if you mix plugins from different releases.
1.0.0 assemblies: ImageResizerTest
3.2.2 assemblies: ImageResizer, ImageResizer.Mvc
You are not using any paid bundles.
Registered plugins:
ImageResizer.Plugins.Basic.DefaultEncoder
ImageResizer.Plugins.Basic.NoCache
ImageResizer.Plugins.Basic.ClientCache
ImageResizer.Plugins.Basic.Diagnostic
ImageResizer.Plugins.Basic.SizeLimiting
ImageResizer.Plugins.MvcRoutingShim.MvcRoutingShimPlugin
ImageResizer.Plugins.Basic.VirtualFolder
Configuration:
<resizer>
<diagnostics enableFor="AllHosts" />
<plugins>
<add name="MvcRoutingShim" />
<add name="VirtualFolder" virtualPath="~/images" physicalPath="Media/Images" vpp="false" />
</plugins>
</resizer>
Accepted querystring keys:
quality, format, thumbnail, maxwidth, maxheight, width, height, w, h, scale, stretch, crop, cropxunits, cropyunits, page, bgcolor, rotate, flip, sourceFlip, sFlip, sRotate, borderWidth, borderColor, paddingWidth, paddingColor, ignoreicc, frame, useresizingpipeline, cache, process, margin, anchor, dpi, mode, zoom,
Accepted file extensions:
bmp, gif, exif, png, tif, tiff, tff, jpg, jpeg, jpe, jif, jfif, jfi,
Environment information:
Running Microsoft Windows NT 6.1.7601 Service Pack 1 and CLR 4.0.30319.269
Trust level: Unrestricted
OS bitness: x86 !! Warning, running as 32-bit on a 64-bit OS(AMD64). This will limit ram usage !!
Executing assembly: C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0\WebDev.WebServer40.exe
IntegratedPipeline: False
Loaded assemblies:
mscorlib Assembly: 4.0.0.0 File: 4.0.30319.269 Info: 4.0.30319.269
System.Web Assembly: 4.0.0.0 File: 4.0.30319.272 Info: 4.0.30319.272
System Assembly: 4.0.0.0 File: 4.0.30319.269 Info: 4.0.30319.269
System.Core Assembly: 4.0.0.0 File: 4.0.30319.233 Info: 4.0.30319.233
System.Configuration Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Xml Assembly: 4.0.0.0 File: 4.0.30319.233 Info: 4.0.30319.233
System.Runtime.Caching Assembly: 4.0.0.0 File: 4.0.30319.237 Info: 4.0.30319.237
Microsoft.Build.Utilities.v4.0 Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.RegularExpressions Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
Microsoft.Build.Framework Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Data Assembly: 4.0.0.0 File: 4.0.30319.237 Info: 4.0.30319.237
Microsoft.JScript Assembly: 10.0.0.0 File: 10.0.30319.1 Info: 10.0.30319.1
CppCodeProvider Assembly: 10.0.0.0 File: 10.0.30319.1 Info: 10.0.30319.1
System.Web.WebPages.Razor Assembly: 2.0.0.0 File: 2.0.20505.0
System.Web.WebPages Assembly: 2.0.0.0 File: 2.0.20505.0
System.Web.Http.WebHost Assembly: 4.0.0.0 File: 4.0.20505.0
System.Web.Mvc Assembly: 4.0.0.0 File: 4.0.20505.0
System.Web.WebPages.Deployment Assembly: 2.0.0.0 File: 2.0.20505.0
System.Web.WebPages.Deployment Assembly: 1.0.0.0 File: 1.0.20105.407
Microsoft.Web.Infrastructure Assembly: 1.0.0.0 File: 1.0.20105.407
System.Xml.Linq Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
App_global.asax.104g7ahn Assembly: 0.0.0.0
ImageResizerTest Assembly: 1.0.0.0 File: 1.0.0.0
WebDev.WebHost40 Assembly: 10.0.0.0 File: 10.0.40219.1 Info: 10.0.40219.1
System.Web.Http Assembly: 4.0.0.0 File: 4.0.20505.0
System.Web.Mobile Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.ServiceModel.Activation Assembly: 4.0.0.0 File: 4.0.30319.233 Info: 4.0.30319.233
System.ServiceModel Assembly: 4.0.0.0 File: 4.0.30319.233 Info: 4.0.30319.233
System.Runtime.DurableInstancing Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
SMDiagnostics Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.Extensions Assembly: 4.0.0.0 File: 4.0.30319.272 Info: 4.0.30319.272
Microsoft.CSharp Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.Services Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Drawing Assembly: 4.0.0.0 File: 4.0.30319.282 Info: 4.0.30319.282
System.EnterpriseServices Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.IdentityModel Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Runtime.Serialization Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.ServiceModel.Web Assembly: 4.0.0.0 File: 4.0.30319.233 Info: 4.0.30319.233
System.Activities Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.ServiceModel.Activities Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.WorkflowServices Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Data.DataSetExtensions Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.ComponentModel.DataAnnotations Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.DynamicData Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.ApplicationServices Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
ImageResizer Assembly: 3.2.2.0 File: 3.2.2.0 Info: 3-2-beta-2 Commit: 3704dd6
ImageResizer.Mvc Assembly: 3.2.2.0 File: 3.2.2.0 Info: 3-2-beta-2 Commit: 3704dd6
Newtonsoft.Json Assembly: 4.5.0.0 File: 4.5.1.14720
System.Net.Http Assembly: 2.0.0.0 File: 1.0.0.0
System.Net.Http.Formatting Assembly: 4.0.0.0 File: 4.0.20505.0
System.Net.Http.WebRequest Assembly: 2.0.0.0 File: 1.0.0.0
System.Web.Helpers Assembly: 2.0.0.0 File: 2.0.20505.0
System.Web.Razor Assembly: 2.0.0.0 File: 2.0.20505.0
System.Web.Routing Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Web.Abstractions Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
Anonymously Hosted DynamicMethods Assembly Assembly: 0.0.0.0
System.Xaml.Hosting Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
System.Xaml Assembly: 4.0.0.0 File: 4.0.30319.1 Info: 4.0.30319.1
Thank you for reporting this bug!
This bug primarily affected users who had changed vpp="false" for the VirtualFolder installation, but also affected users on UNC paths and certain other scenarios.
It has been fixed in release 3.2.3 (changelog).
You can find the latest download here.