web-push-libs/web-push-csharp

Current Edge (Not Chromium Edge) not working

Opened this issue · 1 comments

I tried the sample code for the edge endpoint (with the link https://sg2p.notify.windows.com/w/?token=...), but the error (Unexpected error) occurred.
So, I add the below code, and it can be run without crashing.

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;

But I never get the notification, while for the same info (endpoint, key) works on web-push-php.

Btw, the same version on the NuGet, VapidDetails doesn't have the Expiration. Would that cause the problem ?

I wouldn't recommend this fix. You're allowing .NET to use TLS versions 1.0 and 1.1, both have known vulnerabilities.

Your environment must have an issue where TLS 1.2 isn't working correctly. This could be due to running an old version of windows. I would recommend sorting out this issue over using the fix above.

Sorry for the late reply.