How to Remove DNN Web.Config Inheritance

DNN > Troubleshooting
Issue
You are trying to load an application that is located in a sub directory of your DNN site and you receive a similar error to the one below.
 
Could not load file or assembly 'Spiffy.DatabaseMonitor' or one of its dependencies. The system cannot find the file specified.
 
Cause
The child web.config is inheriting the DNN web.config's configuration settings.
 
Resolution 
You will need to configure the child application's web.config to remove the inheritance. Below is a sample web.config that includes a couple of sections that are very common in DNN web.config files that cause child web.config inheritance issues. You will need to copy the <module> and <handler> sections of your DNN web.config because items in this section will vary from DNN site to DNN site. If you continue to receive errors. You will need to add the web.config sections specified in the error to the child application's web.config and proceed to remove the inheritance. Continue do this until all errors have been resolved.
 
Sample Web.config:
 
?xml version="1.0" encoding="utf-8"?>
<configuration>
  <!-- The system.webServer section is required for IIS7 compatability It is ignored by IIS6 -->
<system.webServer>
      <modules runAllManagedModulesForAllRequests="true">
      <remove name="SpiffyDatabaseMonitor" />
      <remove name="RequestFilter" />
      <remove name="UrlRewrite" />
      <remove name="Exception" />
      <remove name="UsersOnline" />
      <remove name="DNNMembership" />
      <remove name="Personalization" />
      <remove name="Analytics" />
      <remove name="ClientDependencyModule" />
      <remove name="MobileRedirect" />
      <remove name="Services" />
      <remove name="FormsAuthentication" />
      <remove name="UrlRoutingModule-4.0" />
      <remove name="RadUploadModule" />
      <remove name="Detector" />
    </modules>
    <handlers>
      <remove name="WebServiceHandlerFactory-Integrated" />
      <remove name="LogoffHandler*" />
      <remove name="RSSHandler" />
      <remove name="LinkClickHandler" />
      <remove name="CaptchaHandler" />
      <remove name="UserProfilePageHandler" />
      <remove name="RadProgressHandler" />
      <remove name="ClientDependencyHandler" />
      <remove name="UserProfilePicHandler" />
      <remove name="ExtensionlessUrl-Integrated-4.0" />
      <remove name="SitemapHandler" />
      <remove name="Telerik.Web.UI.WebResource" />
      <remove name="Telerik.Web.UI.ChartHttpHandler" />
      <remove name="HtmTemplateFileHandler" />
    </handlers>
  </system.webServer>
  <system.web>
    <!-- HttpModules for Common Functionality -->
    <httpModules>
      <clear />
    </httpModules>
    <httpHandlers>
      <clear />
    </httpHandlers>
  </system.web>
</configuration>
 

Add Feedback