title: Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'aspNetCore
body: <p>I have recently published my ASP.NET Core application to my host. I am hitting a HTTP Error 500.19.</p>
  
  <p>IIS 8.5 says the issue is:-</p>
  
  <p><strong>"Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'aspNetCore'"</strong></p>
  
  <p>It also highlights this key add line in my system.webServer config:-</p>
  
  <pre><code>&lt;handlers&gt;
    &lt;add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule"      
  &lt;/handlers&gt;
  </code></pre>
  
  <p>I'm not really sure what to do on this. It looks as though there is a duplicate instance of this, so I have tried renaming this but it still asks to add this again?</p>
  
  <p>Here is my web.config:-</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;configuration&gt;
  
    &lt;!--
    Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
    --&gt;
  
    &lt;system.webServer&gt;
    &lt;handlers&gt;
      &lt;add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" /&gt;
    &lt;/handlers&gt;
    &lt;aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/&gt;
    &lt;/system.webServer&gt;
  
  &lt;system.net&gt;
  &lt;defaultProxy useDefaultCredentials="true" &gt;
  &lt;/defaultProxy&gt;
  &lt;/system.net&gt;
  &lt;/configuration&gt;
  </code></pre>