title: How to publish MVC application with form authentication on IIS
body: <p>I have an ASP.NET MVC application using <strong>Form Authentication</strong>, with the following configuration in the <code>web.config</code> file:</p>
  
  <pre><code>&lt;system.webServer&gt;
      &lt;modules&gt;
          &lt;remove name="FormsAuthentication" /&gt;
      &lt;/modules&gt;
  &lt;/system.webServer&gt;
  </code></pre>
  
  <p>I can successfully publish the application on IIS from within the Visual Studio. But when I browse it in the browser, I get a <code>500 Internal Server Error</code> with the following description:</p>
  
  <p><a href="https://i.stack.imgur.com/Gx5ez.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gx5ez.png" alt="enter image description here"></a></p>