Skip to content

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

Open
nathan-swannet wants to merge 3 commits intopnp:devfrom
nathan-swannet:dev
Open

fix(auth): fix an issue where an asp.net application could potentially freeze when targetting a SharePoint On-premise environment#1030
nathan-swannet wants to merge 3 commits intopnp:devfrom
nathan-swannet:dev

Conversation

@nathan-swannet
Copy link
Contributor

@nathan-swannet nathan-swannet commented Jun 14, 2024

In the ConfigureOnPremisesContext an event handler is registered containing an async function which is invoked with .GetAwaiter().GetResult();
This can and will freeze your whole asp.net application due to the nature of how the continuation of that task is done in this context.

Wrapping it in a Task.Run fixes this issue and ensures any exception are still thrown in the current synchronisation context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant