title: Page Timeout Exception while create SharePoint Client Context using PNP.Framework in ASP.Net Site
body: <p>I have an Azure ASP.Net Web site. In page load event, creating SharePoint Client Context using Azure AD Application.</p>
  <p>Page keeps on loading and after some time shows page timeout exception. Using below code to create SharePoint Client Context. This code is working in console application but not in ASP.Net page. Please let me know how to fix this.</p>
  <pre><code>public static ClientContext GetClientContextFromrAzureApp(string siteURL, X509Certificate2 CertApp)
  {
      string tenantId = &quot;dbc1c245-33df-411f-a421-...&quot;;
      string ClientId = &quot;7f4ff27b-4200-4cba-a666-....&quot;;// Azure AD Application ID
  
      using (var manager = new PnP.Framework.AuthenticationManager(ClientId, new X509Certificate2(CertApp), tenantId, &quot;&quot;, AzureEnvironment.USGovernmentHigh))
  {
      manager.ClearTokenCache();
      return manager.GetContext(siteURL);
  }
  
  }
  </code></pre>