title: How to set the 'web.config' file to show the full error message (.NET Core 2.1)
body: <p>I hosted my ASP.NET Core app on <a href="https://en.wikipedia.org/wiki/Internet_Information_Services" rel="nofollow noreferrer">IIS</a> (using the publish-in- folder method). I tried to create my own <em>web.config</em> file to see detailed error messages on the client side. So I added file <em>web.config</em>:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;configuration&gt;
      &lt;system.web&gt;
          &lt;customErrors mode=&quot;Off&quot; /&gt;
      &lt;/system.web&gt;
      &lt;system.webServer&gt;
          &lt;httpErrors errorMode=&quot;Detailed&quot; /&gt;
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  <p>After I restarted IIS, nothing happened. Clients still got the default error:</p>
  <p><a href="https://i.stack.imgur.com/6LVyT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6LVyT.png" alt="Enter image description here" /></a></p>
  <p>Can I somehow get additional information about errors using file <em>web.config</em>?</p>