alexalok / dotAPNS

dotAPNS is a library used to send push notifications to Apple devices using Apple Push Notification service via HTTP/2 API.
Apache License 2.0
114 stars 34 forks source link

The SSL connection could not be established, #119

Closed rkbsoftsolutions closed 11 months ago

rkbsoftsolutions commented 1 year ago

Describe the bug . I am getting "The SSL connection could not be established" on production. Sound like website need to SSL certificate. But Is any way to code will work without ssl configured.

Environment OS name and version: "Window Azure App service" .NET version: .NET Core 3.1

alexalok commented 1 year ago

Please see https://github.com/alexalok/dotAPNS/issues/78#issuecomment-852858080 for a possible workaround

rkbsoftsolutions commented 1 year ago

@alexalok thanks for response. But "Window Azure App service" web application not providing any option "App Pool Identiy" like that. Could you please give me more insight, how we can do that?

alexalok commented 1 year ago

Sorry, I'm not familiar with Azure at all. Perhaps you could ask a more general question on StackOverflow, something along the lines of "making an http/2 request with client certificate fails on ..."

rkbsoftsolutions commented 1 year ago

@alexalok I figured out the issue " X509KeyStorageFlags.MachineKeySet)" then restart /publish again application. it is working fine but only first call. When send second call it is getting failed. Any Idea for same ?

rkbsoftsolutions commented 1 year ago

@alexalok we should pass three flags when X509Certificate2 objects. X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet | X509KeyStorageFlags.Exportable

Then Looks working.

rkbsoftsolutions commented 1 year ago

It is in-consistent not working properly.

rkbsoftsolutions commented 1 year ago

@alexalok can i use "Polly" for try if connection get failed? I notice that code is maintaining "ConcurrentDictionary" dictionary. Will it impact on HttpClinet if we use "Polly"?

alexalok commented 1 year ago

Will it impact on HttpClinet if we use "Polly"?

You should be able to use Polly without any difficulties. I have not however tested this setup.

stale[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.