We realized that our API is getting a timeout when it is trying to invoice 'DeleteInstallation()' method, here is a code example from API controller:
using Microsoft.Azure.NotificationHubs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace WebApplication1.Controllers
{
public class ValuesController : ApiController
{
// GET api/values
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
// GET api/values/5
public string Get(int id)
{
var srv = NotificationHubClient.CreateClientFromConnectionString("Endpoint=sb://xxxxxxx", "yyyyy");
srv.DeleteInstallation("450a57c1-37ae-451e-b364-886ace9fa826");
return "Ok!";
}
}
}
if you add a breakpoint in "srv.DeleteInstallation("450a57c1-37ae-451e-b364-886ace9fa826");", it will keep running and it will get a request timeout in the browser.
On the other hand, I did another test from a console app with the same logic, and the code run perfectly, here is my example:
using Microsoft.Azure.NotificationHubs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
var srv = NotificationHubClient.CreateClientFromConnectionString("Endpoint=sb://xxxxxxx", "yyyyy");
srv.DeleteInstallation("450a57c1-37ae-451e-b364-886ace9fa826");
}
}
}
The issue is in the .NET Framework ASP.NET Web API project is getting a timeout for "DeleteInstallation()", we are having the same error with "InstallationExists()" as well.
Both projects is using these specifications:
.NET Framework 4.6.1
Microsoft.Azure.NotificationHubs 4.1.0
Exception or Stack Trace
Add the exception log and stack trace if available
To Reproduce
Create a new ASP.Net Web API Project and Console App Project for .NET Framework 4.6.1
Add code showed above
Add a breakpoint in lines where it get call the mehtod "srv.DeleteInstallation("450a57c1-37ae-451e-b364-886ace9fa826");"
Web API isn't able to complete the request, nevertheless the console app is able to complete the run.
Expected behavior
API project will be able to complete the request and run the Azure Hub Message methods.
Additional context
This bug is currently happening in production at our azure app service, it was working fine but at some point, it started failing.
Describe the bug
We realized that our API is getting a timeout when it is trying to invoice 'DeleteInstallation()' method, here is a code example from API controller:
if you add a breakpoint in "srv.DeleteInstallation("450a57c1-37ae-451e-b364-886ace9fa826");", it will keep running and it will get a request timeout in the browser.
On the other hand, I did another test from a console app with the same logic, and the code run perfectly, here is my example:
The issue is in the .NET Framework ASP.NET Web API project is getting a timeout for "DeleteInstallation()", we are having the same error with "InstallationExists()" as well.
Both projects is using these specifications:
Exception or Stack Trace Add the exception log and stack trace if available
To Reproduce
Expected behavior API project will be able to complete the request and run the Azure Hub Message methods.
Additional context This bug is currently happening in production at our azure app service, it was working fine but at some point, it started failing.