title: Web.config system.webserver errors
body: <p>I'm trying to deploy my C# ASP.Net app to my hosting site. The problem is I have 2 C++ dlls that the app uses, but with shared hosting they can't be in the bin folder. They've been referenced in the project fom a folder called 'bin_native'. The app runs on my machine with using the probing privatePath in the runtime section of the web.config and Assembly directives at the top of my Default.aspx file. But it won't run on the server like that. It can't find the dlls when parsing the default.aspx when the site loads, with an error at the 2 Assembly directives at the top of that file.</p>
  
  <p>So I'm trying to add references to the dlls in the system.webserver section of the web.config. Support for the site said if I can do that maybe the app can use a separate bin folder that is located in the parent directory of my sites wwwroot folder (where the ASP.Net bin folder is). That way the app can find the dlls.</p>
  
  <p>But I can't get the system.webserver section correct without errors. When I test on my machine I get the following error:</p>
  
  <pre><code>Server Error in '/' Application.
  
  Could not load file or assembly 'find_duplicates, Version=0.0.0.0, Culture=neutral, PublicKeyToken=e02ee5289fcc8248' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
  
  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. 
  
  Exception Details: System.IO.FileLoadException: Could not load file or assembly 'find_duplicates, Version=0.0.0.0, Culture=neutral, PublicKeyToken=e02ee5289fcc8248' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
  </code></pre>
  
  <p>Here are the changes in my project I've made so far:</p>
  
  <p>Default.aspx:</p>
  
  <pre><code>&lt;%@ Assembly Name="find_duplicates" %&gt;
  &lt;%@ Assembly Name="trim_combos" %&gt;
  </code></pre>
  
  <p>Web.config:</p>
  
  <pre><code> &lt;system.webServer&gt;
  
      &lt;modules runAllManagedModulesForAllRequests="true"&gt;
  
       &lt;add name="find_duplicates" type="find_dups.find_duplicates, find_duplicates,Version=0.0.0.0, Culture=neutral, PublicKeyToken=e02ee5289fcc8248"  /&gt;
  
        &lt;add name="trim_combos" type="trim_coms.trim_combos, trim_combos, Version=0.0.0.0, Culture=neutral, PublicKeyToken=e02ee5289fcc8248"  /&gt;
  
       &lt;/modules&gt;
  
      &lt;validation validateIntegratedModeConfiguration="false" /&gt;
  
    &lt;/system.webServer&gt;
  
   &lt;runtime&gt;  
  
      &lt;dependentAssembly&gt;
  
         &lt;assemblyIdentity name="find_dups.find_duplicates.find_duplicates" publicKeyToken="e02ee5289fcc8248" culture="neutral" /&gt;
  
      &lt;/dependentAssembly&gt;
  
      &lt;dependentAssembly&gt;
  
          &lt;assemblyIdentity name="trim_coms.trim_combos.trim_combos" publicKeyToken="e02ee5289fcc8248" culture="neutral" /&gt;
  
      &lt;/dependentAssembly&gt; 
  
  
  
     &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
  
          &lt;probing privatePath="bin_native"/&gt;
  
     &lt;/assemblyBinding&gt;
  
  &lt;/runtime&gt;
  </code></pre>
  
  <p>My dlls are defined in the header files as:</p>
  
  <pre><code>find_duplicates dll
  
  namespace   find_dups
  class       find_duplicates
  
  trim_combos   dll
  
  namespace   trim_coms
  class       trim_combos
  </code></pre>
  
  <p>I'm on Windows 7 64 bit running IIS in Integrated Pipeline mode. That's why I'm using the system.webserver section instead of the the system.web section in the web.config.</p>
  
  <p>Any help with this would be greatly appreciated. Thanks in advance.</p>