4

Is there any WebSockets solution/middleware for ASP.NET Core which includes out of the box ability for configuring connections over ssl, I just can't find such a thing in standard implementation.

Grigoryants Artem
  • 1,401
  • 2
  • 15
  • 32
  • Websockets and ssl operate at very different layers, there's no overlapping config. Configure your server for https and use the normal websockets middleware. – Tratcher Jan 01 '18 at 15:36
  • Possible duplicate of [html5 Websocket with SSL](https://stackoverflow.com/questions/9745249/html5-websocket-with-ssl) – poke Jan 01 '18 at 19:05
  • With ASP.NET Core configured for HTTPS, just use `wss://` for your WebSocket connection. – poke Jan 01 '18 at 19:05
  • Websockets follow the lead of the main connection, i.e. if your site is served over HTTPS, the browser will also use the `wss` protocol for websockets. – Chris Pratt Jan 02 '18 at 16:26
  • Read answers to understand how it works: https://stackoverflow.com/questions/26791107/wss-on-http-vs-wss-on-https – Artur Kedzior May 27 '19 at 21:43

0 Answers0