title: MVC4 Windows Azure ACS 500 Internal Server Error when Authentication Forms
body: <p>I´m following this tutorial:http://robbincremers.me/2012/02/22/using-windows-azure-access-control-service-to-provide-a-single-sign-on-experience-with-popular-identity-providers/#comment-469</p>
  
  <p>Using this guide or others, when uncomment the authentication forms in the web config for using the custom html login form downloaded from windows azure access control portal, I get an 500 Internal Server Error. What could be wrong?</p>
  
  <p>It is just adding authentication form</p>
  
  <pre><code>&lt;location path="FederationMetadata"&gt;
      &lt;system.web&gt;
        &lt;customErrors mode="Off"/&gt;
        &lt;authorization&gt;
          &lt;allow users="*" /&gt;
        &lt;/authorization&gt;
      &lt;/system.web&gt;
    &lt;/location&gt;
    &lt;system.web&gt;
      &lt;httpRuntime requestValidationMode="2.0"/&gt;
     &lt;!-- &lt;authorization&gt;
        &lt;deny users="?" /&gt;
      &lt;/authorization&gt;--&gt;
      &lt;authentication mode="None" /&gt;
      &lt;compilation debug="true" targetFramework="4.0"&gt;
        &lt;assemblies&gt;
          &lt;add assembly="Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /&gt;
        &lt;/assemblies&gt;
      &lt;/compilation&gt;
      &lt;!--Commented out by FedUtil--&gt;
      &lt;authentication mode="Forms"&gt;&lt;forms loginUrl="~/Federation/Login.html" timeout="2880" /&gt;&lt;/authentication&gt;
      &lt;pages&gt;
        &lt;namespaces&gt;
          &lt;add namespace="System.Web.Helpers" /&gt;
          &lt;add namespace="System.Web.Mvc" /&gt;
          &lt;add namespace="System.Web.Mvc.Ajax" /&gt;
          &lt;add namespace="System.Web.Mvc.Html" /&gt;
          &lt;add namespace="System.Web.Optimization" /&gt;
          &lt;add namespace="System.Web.Routing" /&gt;
          &lt;add namespace="System.Web.WebPages" /&gt;
        &lt;/namespaces&gt;
      &lt;/pages&gt;
      &lt;httpModules&gt;
        &lt;add name="WSFederationAuthenticationModule" type="Microsoft.IdentityModel.Web.WSFederationAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
        &lt;add name="SessionAuthenticationModule" type="Microsoft.IdentityModel.Web.SessionAuthenticationModule, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
      &lt;/httpModules&gt;
    &lt;/system.web&gt;
  </code></pre>