How to secure WebSocket connections with TLS/SSL (Windows Store apps using C#/VB/C++ and XAML)
This topic explains how to secure WebSocket connections with Transport Layer Security (TLS)/Secure Sockets Layer (SSL) when using the StreamWebSocket and MessageWebSocket features in Windows 8 for a Windows Store app.
In most cases you'll want to use a secure WebSocket connection. This will increase the chances that your connection will succeed, as many proxies will reject unencrypted WebSocket connections.
Enables network communications using sockets and WebSockets.
The WebSocket Protocol defines two URI schemes. ws: is used for unencrypted connections, while wss: is used for secure connections that should be encrypted.
- To encrypt your connection, use the wss: URI scheme. For example:
For additional details on the WebSocket URI schemes, see the WebSocket Protocol.
- Connecting with WebSockets