Page Timeout Exception while create SharePoint Client Context using PNP.Framework in ASP.Net Site
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 259
- Forks
- 161
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
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);
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with GetClientContextFromrAzureApp and compare its execution in the ASP.Net page-load path with the working console application. Reproduce the timeout and inspect the PnP.Framework AuthenticationManager and certificate-based Azure AD setup; done means SharePoint ClientContext creation completes without the page timing out.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- authentication, backend, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100