Code-Sharp / WampSharp

A C# implementation of WAMP (The Web Application Messaging Protocol)
http://wampsharp.net
Other
385 stars 84 forks source link

Unable to open channel, WebAssembly, client-side code #362

Closed manveldavid closed 10 months ago

manveldavid commented 10 months ago

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

darkl commented 10 months ago

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

manveldavid commented 10 months ago

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