title: Could not load type ImageResizer.InterceptModule
body: <p>ImageResizer is setup and working in our test and development environments, however we can not get it working in our production environment. I have setup the IIS site the same (except for the name etc) and have the same Web.config options (only ImageResizer related things in there).... and no dice. We keep getting the error below. We have already tried re-downloading the files, and we checked the other suggestions. All to no avail.</p>
  
  <p><strong>.NET Version 4.5.2.</strong></p>
  
  <p>dll version 4.0.4.934 (we also tried with 4.0.5)... same result.</p>
  
  <p>At the very bottom of the error page, the following displays... which may explain things? .NET 4.5.2 is on the server but it looks like the site is not configured to use it, perhaps?:</p>
  
  <p><strong>Version Information:</strong> Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34274</p>
  
  <blockquote>
    <p>Server Error in '/' Application.</p>
    
    <p>Could not load type 'ImageResizer.InterceptModule'.</p>
    
    <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>
    
    <p>Exception Details: System.Web.HttpException: Could not load type 'ImageResizer.InterceptModule'.</p>
    
    <p>Source Error: </p>
    
    <p>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</p>
    
    <p>Stack Trace: </p>
    
    <p>[HttpException (0x80004005): Could not load type 'ImageResizer.InterceptModule'.]
       System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +12512121
       System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +76</p>
    
    <p>[ConfigurationErrorsException: Could not load type 'ImageResizer.InterceptModule'.]
       System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +12425644
       System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +69
       System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +62
       System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +299
       System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1262
       System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +133
       System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
       System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
       System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475</p>
    
    <p>[HttpException (0x80004005): Could not load type 'ImageResizer.InterceptModule'.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12618980
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12458597</p>
  </blockquote>
  
  <p><strong>web.config</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
      &lt;configSections&gt;
          &lt;section name="resizer" type="ImageResizer.ResizerSection,ImageResizer" requirePermission="false" /&gt;
      &lt;/configSections&gt;
      &lt;resizer&gt;
          &lt;!-- Unless you (a) use Integrated mode, or (b) map all requests to ASP.NET, 
          you'll need to add .ashx to your image URLs: image.jpg.ashx?width=200&amp;height=20 --&gt;
          &lt;pipeline fakeExtensions=".ashx" defaultCommands="autorotate.default=true" /&gt;
          &lt;diskcache dir="/cache" /&gt;
          &lt;plugins&gt;
              &lt;add name="DiskCache" /&gt;
              &lt;!-- &lt;add name="PrettyGifs" /&gt; --&gt;
              &lt;!-- &lt;add name="SimpleFilters" /&gt; --&gt;
              &lt;!-- &lt;add name="S3Reader" /&gt; --&gt;
          &lt;/plugins&gt;
      &lt;/resizer&gt;
      &lt;system.web&gt;
          &lt;httpModules&gt;
              &lt;!-- This is for IIS7/8 Classic Mode and Cassini--&gt;
              &lt;add name="ImageResizingModule" type="ImageResizer.InterceptModule" /&gt;
          &lt;/httpModules&gt;
      &lt;/system.web&gt;
      &lt;system.webServer&gt;
          &lt;validation validateIntegratedModeConfiguration="false" /&gt;
          &lt;modules&gt;
              &lt;!-- This is for IIS7/8 Integrated mode --&gt;
              &lt;add name="ImageResizingModule" type="ImageResizer.InterceptModule" /&gt;
          &lt;/modules&gt;
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Additional Error Info...</p>
  
  <blockquote>
    <p>Could not load file or assembly 'ImageResizer' or one of its dependencies. The system cannot find the file specified.</p>
    
    <p>Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. </p>
    
    <p>Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'ImageResizer' or one of its dependencies. The system cannot find the file specified.</p>
    
    <p>Source Error: </p>
    
    <p>An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</p>
    
    <p>Assembly Load Trace: The following information can be helpful to determine why the assembly 'ImageResizer' could not be loaded.</p>
    
    <p>WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].</p>
  </blockquote>