Forum Discussion
johnboy1970
Aug 11, 2023Copper Contributor
authenticationManager.GetACSAppOnlyContext: ExecuteQuery() - throws error "Token Request Failed"
Hi.
I have a .Net Core v6 MVC project using Nuget Package PnP.Framework 1.13.0. This project works fine in LIVE on the App Service in Azure. However, using Visual Studio 2022 and debug on this project keeps throwing a "The SSL connection could not be established, see inner exception.'" or "Token Request failed". This has only started happening recently. I updated to windows 11 about 6 months ago. It did seem firstly intermittent and now it happends pretty much every time on the ExecuteQuery(). I'm wondering if there is throttling somewhere.
AuthenticationManager authenticationManager = new AuthenticationManager();
using (ClientContext clientContext = authenticationManager.GetACSAppOnlyContext(_siteUrl, _clientId, _clientSecret))
{
User Requester = clientContext.Web.EnsureUser(emailAddress);
clientContext.Load(Requester);
clientContext.Load(clientContext.Web);
clientContext.ExecuteQuery();
Does anyone know if this still works in Debug Mode?
Any help appreciated.
Thanks.
John.
No RepliesBe the first to reply