Azure / azure-notificationhubs-dotnet

.NET SDK for Azure Notification Hubs
MIT License
71 stars 123 forks source link

ASP.NET MVC 5 .NET 4.7.2 hangs when calling InstallationExists or DeleteInstallation #249

Open filmar25 opened 1 year ago

filmar25 commented 1 year ago

Hi,

We want integrate Push Notification in our ASP.NET MVC 5 application.

When I try to remove installation by using InstallationExists or DeleteInstallation.

It seems that the mechanism to manage the retries never finish.

I run in debug mode to see what's appening and I saw that the HttpRequest got 404.

The problem occurs inside of RunOperation of NotificationHubRetryPolicy.cs when running this line :

    return await operation(cancellationToken).ConfigureAwait(false);

Can someone can help me with this problem ?

filmar25 commented 1 year ago

There is the workaround I use for it.

I change the Controller/Action to have Action and backend service method async.

I use all Async method of SDK and it is now functionnal.

It seems that non async is not supported by the SDK

idenardi commented 1 year ago

I'm having the same issue. But i didn't understand your workaround @filmar25.

What do you mean by

I change the Controller/Action to have Action and backend service method async.

Can you show me a code before and after your workaround?