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 have a WCF (Windows Communication Foundation) server. Recently, I tried to update the sending of notifications from a basic https request to Firebase Admin SDK.
The code I'm using in console version works perfectly from my machine. On the other hand, the same code used from the WCF on the same machine remains blocked when sending.
After many investigations, the problem concerned this code:
options.HttpClientFactory = new ProxyAwareHttpClientFactory();
//...
public class ProxyAwareHttpClientFactory : HttpClientFactory
{
protected override HttpMessageHandler CreateHandler(CreateHttpClientArgs args)
{
var httpClientHandler = new HttpClientHandler
{
Proxy = new WebProxy(GlobalSettings.ProxyUrl, GlobalSettings.ProxyPort),
UseProxy = true
};
return httpClientHandler;
}
}
I thought this code would allow Firebase to send messages via the proxy specified in the ProxyAwareHttpClientFactory. However, this is not the case, the proxy is not used. To get around the problem, I specified the proxy in the web.config file, as follows:
I have a WCF (Windows Communication Foundation) server. Recently, I tried to update the sending of notifications from a basic https request to Firebase Admin SDK.
The code I'm using in console version works perfectly from my machine. On the other hand, the same code used from the WCF on the same machine remains blocked when sending.
Here's the method I use:
The method remains blocked at the following line:
Could you please tell me what could have caused the problem?
Note that I'm using a proxy and that there may also be a firewall on the machine. Are there any specific ports that need to be unblocked?
If so, how can this work from my executable?
Thanks in advance for your help, and have a nice day,
I tried to send a notification through FCM from my WCF.
The text was updated successfully, but these errors were encountered: