title: Not able to set up Azure AD B2C on .NET Web Forms
body: <p>I'm currently not able to set up Azure AD B2C on .NET Web Forms</p>
  
  <p>I could set up in MVC or .NET Core in no more than 5 minutes but we have a legacy and I can't do this in another tech.</p>
  
  <p>I have followed <a href="https://github.com/Zen3InfoSolutions/B2C-WebForms-DotNet" rel="nofollow noreferrer">this reference</a> and just changed to my current config and got 500 error, once I click sign up or sign in buttons.</p>
  
  <pre><code>&lt;add key="ida:Tenant" value="aicdb2c.onmicrosoft.com" /&gt;
  &lt;add key="ida:ClientId" value="{application_id}" /&gt;
  &lt;add key="ida:AadInstance" value="https://login.microsoftonline.com/{0}/v2.0/.well-known/openid-configuration?p={1}" /&gt;
  &lt;add key="ida:RedirectUri" value="http://localhost:58851/" /&gt;
  &lt;add key="ida:SignUpPolicyId" value="B2C_1_sign_up" /&gt;
  &lt;add key="ida:SignInPolicyId" value="B2C_1_sign_in" /&gt;
  &lt;add key="ida:UserProfilePolicyId" value="B2C_1_edit_profile" /&gt;
  </code></pre>
  
  <p>The message error is not helpful. It's just a generic message: "The page cannot be displayed because an internal server error has occurred".</p>
  
  <p>After getting this message, if I hit enter in the address bar (<a href="http://localhost:58851/" rel="nofollow noreferrer">http://localhost:58851/</a>), I can access the page normally. Otherwise, I just get a blank page with this message.</p>
  
  <p>I have Googled a lot and no luck.</p>
  
  <p>I appreciate any help.</p>