You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Microsoft.Identity.Web.GraphServiceClient and calling GetAsync off of CalendarView. When I add retryHandlerOption I get an error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds.
As soon as I remove the retryHandlerOption the call works fine.
var retryHandlerOption = new RetryHandlerOption
{
MaxRetry = 7,
ShouldRetry = (delay,attempt,message) => true
};
var foundEvents = await _graphServiceClient.Users[email].CalendarView.GetAsync(requestConfiguration =>
{
requestConfiguration.QueryParameters.StartDateTime = startDate.ToString("yyyy-MM-ddT00:00:00");
requestConfiguration.QueryParameters.EndDateTime = endDate.Value.ToString("yyyy-MM-ddT23:59:59");
requestConfiguration.Options.Add(retryHandlerOption); //if I remove this line the code works fine
});
Expected behavior
If I console out in the delegate I can see retries are happening but it always times out and the getasync always fails. I expect getAsync to succeed like normal when I add the retryHandlerOption.
How to reproduce
This code was run in an asp.net web api.
SDK Version
5.56.0
Latest version known to work for scenario above?
4.40.0
Known Workarounds
Don't use retry which really isn't a work around since I want resiliency, or go back to 4.40, or maybe roll my own using Polly.
Debug output
Click to expand log
The request was canceled due to the configured HttpClient.Timeout of 100 seconds
</details>
### Configuration
Development on windows 11
x64
API runs inside docker from image:
mcr.microsoft.com/dotnet/aspnet:8.0.7-bookworm-slim
### Other information
_No response_
The text was updated successfully, but these errors were encountered:
Any chance the code works if you remove the line with the delegate? I suspect since you are always returning true, even successful responses are being retried....
Any chance the code works if you remove the line with the delegate? I suspect since you are always returning true, even successful responses are being retried....
Describe the bug
I am using the Microsoft.Identity.Web.GraphServiceClient and calling GetAsync off of CalendarView. When I add retryHandlerOption I get an error: The request was canceled due to the configured HttpClient.Timeout of 100 seconds.
As soon as I remove the retryHandlerOption the call works fine.
Expected behavior
If I console out in the delegate I can see retries are happening but it always times out and the getasync always fails. I expect getAsync to succeed like normal when I add the retryHandlerOption.
How to reproduce
This code was run in an asp.net web api.
SDK Version
5.56.0
Latest version known to work for scenario above?
4.40.0
Known Workarounds
Don't use retry which really isn't a work around since I want resiliency, or go back to 4.40, or maybe roll my own using Polly.
Debug output
Click to expand log
The request was canceled due to the configured HttpClient.Timeout of 100 secondsThe text was updated successfully, but these errors were encountered: