Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(auth): fix an issue where an asp.net application could potentially freeze when targetting a SharePoint On-premise environment #1030

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/PnP.Framework/AuthenticationManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ internal void ConfigureOnPremisesContext(string siteUrl, ClientContext clientCon
// PowerShell do support SharePoint on-premises.
webRequestEventArgs.WebRequestExecutor.WebRequest.Credentials = (sender as ClientContext).Credentials;
// CSOM for .NET Standard does not handle request digest management, a POST to client.svc requires a digest, so ensuring that
webRequestEventArgs.WebRequestExecutor.RequestHeaders["X-RequestDigest"] = (sender as ClientContext).GetOnPremisesRequestDigestAsync().GetAwaiter().GetResult();
webRequestEventArgs.WebRequestExecutor.RequestHeaders["X-RequestDigest"] = Task.Run(async () => await (sender as ClientContext).GetOnPremisesRequestDigestAsync()).GetAwaiter().GetResult();
// Add Request Header to force Windows Authentication which avoids an issue if multiple authentication providers are enabled on a webapplication
webRequestEventArgs.WebRequestExecutor.RequestHeaders["X-FORMS_BASED_AUTH_ACCEPTED"] = "f";
};
Expand Down
Loading