Skip to content

Instantly share code, notes, and snippets.

@migasj
Last active March 15, 2016 19:19
Show Gist options
  • Save migasj/b042daed5309c0a268eb to your computer and use it in GitHub Desktop.
Save migasj/b042daed5309c0a268eb to your computer and use it in GitHub Desktop.
Prevent ImageResizer from inheriting to app folder in IIS a.k.a. fix for error "Could not load type 'ImageResizer.InterceptModule'."

#Prevent ImageResizer from inheriting to app folder in IIS

Apps folders in IIS will inherit the web.config file of the parent. ImageResizer if not installed in the child app will throw an error in this setup. The below solution is the fix for this issue.

Assuming you used the default names given in the installation instructions for ImageResizer the below sections must be added to the app's web.config to prevent the error "Could not load type 'ImageResizer.InterceptModule'." These additions will remove references to ImageResizer from your child application. ImageResizer does include part of this in their own troubleshooting however their solution is incomplete.

<configuration>
	<configSections>
  	<remove name="resizer"/>
 	</configSections>
	<system.webServer>
		<modules>
			<remove name="ImageResizingModule"/>
		</modules>
  </system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment