Code-Sharp/WampSharp

Unable to open channel, WebAssembly, client-side code

manveldavid opened this issue · 2 comments

Describtion

The WebSocketTransport SetClientWebSocketOptions RemoteCertificateValidationCallback setting makes it unable to open a channel via WebAssembly page code

To Reproduce bug

Here is a standalone project that reproduces the issue:
https://github.com/manveldavid/WebAssemblyWampSsl

Problem in WebAssemblyWampSsl/Client/Pages/Index.razor 22 line
Put breakpoin, start the WebAssemblyWampSsl/Server/WebAssemblyWampSsl.Server.csproj, wait for the page to render in the browser.

If you replace the 18 line .SetClientWebSocketOptions(config => config.RemoteCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true) with .SetClientWebSocketOptions(config => { }), the bug is not reproduced

Seems like it is not supported by Blazor, see here.

Okay, thank you very much!
This is not really supported on the Blazor WebAssembly side