I have an Azure ASP.Net Web site. In page load event, creating SharePoint Client Context using Azure AD Application.
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.
public static ClientContext GetClientContextFromrAzureApp(string siteURL, X509Certificate2 CertApp)
{
string tenantId = "dbc1c245-33df-411f-a421-...";
string ClientId = "7f4ff27b-4200-4cba-a666-....";// Azure AD Application ID
using (var manager = new PnP.Framework.AuthenticationManager(ClientId, new X509Certificate2(CertApp), tenantId, "", AzureEnvironment.USGovernmentHigh))
{
manager.ClearTokenCache();
return manager.GetContext(siteURL);
}
I have an Azure ASP.Net Web site. In page load event, creating SharePoint Client Context using Azure AD Application.
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.
public static ClientContext GetClientContextFromrAzureApp(string siteURL, X509Certificate2 CertApp) { string tenantId = "dbc1c245-33df-411f-a421-..."; string ClientId = "7f4ff27b-4200-4cba-a666-....";// Azure AD Application ID
}