diff --git a/README.md b/README.md index 500d472f1..b00d1d7f5 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ e.g. Using the HttpModule requires no code writing at all. Just reference the binaries and add the relevant sections to the web.config -Image requests suffixed with querystring parameters will then be processed and **cached to the server - up to 360,000 images** allowing for easy and efficient parsing of following requests. +Image requests suffixed with querystring parameters will then be processed and **cached to the server - up to 12,960,000 images** allowing for easy and efficient parsing of following requests. The parsing engine for the HttpModule is incredibly flexible and will **allow you to add querystring parameters in any order.** diff --git a/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs b/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs index 2ae42b659..5b2b2c87e 100644 --- a/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs +++ b/src/ImageProcessor.Web/Config/ImageProcessorConfig.cs @@ -10,7 +10,11 @@ namespace ImageProcessor.Web.Config #region Using using System; using System.Collections.Generic; + using System.IO; using System.Linq; + using System.Reflection; + using System.Text; + using ImageProcessor.Processors; #endregion @@ -234,20 +238,49 @@ namespace ImageProcessor.Web.Config { if (this.GraphicsProcessors == null) { - // Build a list of native IGraphicsProcessor instances. - Type type = typeof(IGraphicsProcessor); - IEnumerable types = - AppDomain.CurrentDomain.GetAssemblies().SelectMany(s => s.GetTypes()).Where( - p => type.IsAssignableFrom(p) && p.IsClass && !p.IsAbstract).ToList(); + try + { + // Build a list of native IGraphicsProcessor instances. + Type type = typeof(IGraphicsProcessor); + IEnumerable types = + AppDomain.CurrentDomain.GetAssemblies() + .SelectMany(s => s.GetTypes()) + .Where(p => type.IsAssignableFrom(p) && p.IsClass && !p.IsAbstract) + .ToList(); - // Create them and add. - this.GraphicsProcessors = - types.Select(x => (Activator.CreateInstance(x) as IGraphicsProcessor)).ToList(); + // Create them and add. + this.GraphicsProcessors = + types.Select(x => (Activator.CreateInstance(x) as IGraphicsProcessor)).ToList(); - // Add the available settings. - foreach (IGraphicsProcessor processor in this.GraphicsProcessors) + // Add the available settings. + foreach (IGraphicsProcessor processor in this.GraphicsProcessors) + { + processor.Settings = this.GetPluginSettings(processor.Name); + } + } + catch (ReflectionTypeLoadException ex) { - processor.Settings = this.GetPluginSettings(processor.Name); + StringBuilder sb = new StringBuilder(); + foreach (Exception exception in ex.LoaderExceptions) + { + sb.AppendLine(exception.Message); + if (exception is FileNotFoundException) + { + FileNotFoundException fileNotFoundException = exception as FileNotFoundException; + if (!string.IsNullOrEmpty(fileNotFoundException.FusionLog)) + { + sb.AppendLine("Fusion Log:"); + sb.AppendLine(fileNotFoundException.FusionLog); + } + } + + sb.AppendLine(); + } + + string errorMessage = sb.ToString(); + + // Display or log the error based on your application. + throw new Exception(errorMessage); } } } diff --git a/src/ImageProcessor.Web/ImageProcessor.Web.csproj b/src/ImageProcessor.Web/ImageProcessor.Web.csproj index 51aff4acc..b6a4d53d4 100644 --- a/src/ImageProcessor.Web/ImageProcessor.Web.csproj +++ b/src/ImageProcessor.Web/ImageProcessor.Web.csproj @@ -74,10 +74,6 @@ False ..\packages\Microsoft.Bcl.Async.1.0.14-rc\lib\net40\Microsoft.Threading.Tasks.Extensions.dll - - False - ..\packages\Microsoft.Bcl.Async.1.0.14-rc\lib\net40\Microsoft.Threading.Tasks.Extensions.Desktop.dll - @@ -85,25 +81,16 @@ False ..\packages\System.Data.SQLite.x86.1.0.84.0\lib\net40\System.Data.SQLite.dll - - False - ..\packages\System.Data.SQLite.x86.1.0.84.0\lib\net40\System.Data.SQLite.Linq.dll - - ..\packages\Microsoft.Bcl.1.0.16-rc\lib\net40\System.Runtime.dll + bin\x86\Release\System.Runtime.dll - - ..\packages\Microsoft.Bcl.1.0.16-rc\lib\net40\System.Threading.Tasks.dll - False + + bin\x86\Release\System.Threading.Tasks.dll - - - - diff --git a/src/ImageProcessor.Web/Properties/AssemblyInfo.cs b/src/ImageProcessor.Web/Properties/AssemblyInfo.cs index 8c1188b5e..7b15bb39a 100644 --- a/src/ImageProcessor.Web/Properties/AssemblyInfo.cs +++ b/src/ImageProcessor.Web/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("2.1.0.0")] -[assembly: AssemblyFileVersion("2.1.0.0")] +[assembly: AssemblyVersion("2.1.0.4")] +[assembly: AssemblyFileVersion("2.1.0.4")] diff --git a/src/ImageProcessor.Web/app.config b/src/ImageProcessor.Web/app.config index f9f9fa9b5..7c3ea93fc 100644 --- a/src/ImageProcessor.Web/app.config +++ b/src/ImageProcessor.Web/app.config @@ -1,7 +1,7 @@  - + diff --git a/src/Nuget/ImageProcessor.1.4.1.0.nupkg b/src/Nuget/ImageProcessor.1.4.1.0.nupkg new file mode 100644 index 000000000..06ae2f3d5 Binary files /dev/null and b/src/Nuget/ImageProcessor.1.4.1.0.nupkg differ diff --git a/src/Nuget/ImageProcessor.Web.2.1.0.0.nupkg b/src/Nuget/ImageProcessor.Web.2.1.0.0.nupkg new file mode 100644 index 000000000..b960407ee Binary files /dev/null and b/src/Nuget/ImageProcessor.Web.2.1.0.0.nupkg differ diff --git a/src/Nuget/ImageProcessor.Web.2.1.0.1.nupkg b/src/Nuget/ImageProcessor.Web.2.1.0.1.nupkg new file mode 100644 index 000000000..ea29c4557 Binary files /dev/null and b/src/Nuget/ImageProcessor.Web.2.1.0.1.nupkg differ diff --git a/src/Nuget/ImageProcessor.Web.2.1.0.2.nupkg b/src/Nuget/ImageProcessor.Web.2.1.0.2.nupkg new file mode 100644 index 000000000..f64d45844 Binary files /dev/null and b/src/Nuget/ImageProcessor.Web.2.1.0.2.nupkg differ diff --git a/src/Nuget/ImageProcessor.Web.2.1.0.3.nupkg b/src/Nuget/ImageProcessor.Web.2.1.0.3.nupkg new file mode 100644 index 000000000..dc1716f01 Binary files /dev/null and b/src/Nuget/ImageProcessor.Web.2.1.0.3.nupkg differ diff --git a/src/Nuget/ImageProcessor.Web.2.1.0.4.nupkg.REMOVED.git-id b/src/Nuget/ImageProcessor.Web.2.1.0.4.nupkg.REMOVED.git-id new file mode 100644 index 000000000..0ab6ebd84 --- /dev/null +++ b/src/Nuget/ImageProcessor.Web.2.1.0.4.nupkg.REMOVED.git-id @@ -0,0 +1 @@ +eaff612b7db9e40f185c91161fd9c977faec69bb \ No newline at end of file diff --git a/src/Test/Test/Images/Thumbs.db.REMOVED.git-id b/src/Test/Test/Images/Thumbs.db.REMOVED.git-id index 50d30e828..3619925b0 100644 --- a/src/Test/Test/Images/Thumbs.db.REMOVED.git-id +++ b/src/Test/Test/Images/Thumbs.db.REMOVED.git-id @@ -1 +1 @@ -df51932368e72ec3c9b9897d29e27dcf20af7395 \ No newline at end of file +32c1c68dd25fc55293b1a21c1ea25002c53f984b \ No newline at end of file diff --git a/src/Test/Test/Web.config b/src/Test/Test/Web.config index 09f93bfb9..a0c1831b7 100644 --- a/src/Test/Test/Web.config +++ b/src/Test/Test/Web.config @@ -4,84 +4,84 @@ http://go.microsoft.com/fwlink/?LinkId=152368 --> - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file