title: Sustainsys.Saml2 start authentication dynamically for ASP.NET
body: <p>Hello I try to SMAL integration with <a href="https://saml2.sustainsys.com/en/2.0/" rel="nofollow noreferrer">Sustainsys.Saml2</a>. I develop an web application with ASP.NET (not MVC or Core). This web application is service provider for SAML.</p>
  
  <p>I changed the my config as in the <a href="https://github.com/Sustainsys/Saml2/blob/master/Samples/SampleMvcApplication/Web.config" rel="nofollow noreferrer">example</a>. Now I need to start authenticate in my login page and redirect to identity provider's page. <a href="https://saml2.sustainsys.com/en/2.0/getting-started.html" rel="nofollow noreferrer">In this page</a> they say for ASP.NET web forms "In many cases it should just be configured in the web.config file and work without any code written in the application at all". But authentication not start automatically.</p>
  
  <p>I run MVC example and see this line in Index.cshtml</p>
  
  <pre><code>&lt;a href="@Url.Content("~/Saml2/SignIn")"&gt;Sign in&lt;/a&gt; - default IDP
  @foreach (var idp in Sustainsys.Saml2.Configuration.SustainsysSaml2Section.Current.IdentityProviders)
  {
      var entityId = idp.EntityId;
      var destinationUrl = idp.SignOnUrl;
      &lt;br /&gt;
      &lt;a href="@Url.Content("~/Saml2/SignIn?idp=" + HttpUtility.UrlEncode(entityId))"&gt;Sign in&lt;/a&gt;@: - @entityId - @destinationUrl
  }
  </code></pre>
  
  <p>If I click this link it redirect to identity provider's page. How can integrate this for ASP.Net and start authentication for ASP.Net?</p>