Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1501

WSS support for C# .exe to work over https

$
0
0

I have .net .exe, which listens to web sockets. It works perfectly over http.When my sender shifted to WSS over https, my .exe is unable to decrypt the incoming request.My client receives byte array, but when I try to decrypt it to UTF Encoding, it doesn't decrypt correctly via Encoding.GetEncoding("ISO-8859-1");

Code:

public void ReadCallback(IAsyncResult ar){    try    {        // Retrieve the state object        // and the handler socket        // from the asynchronous state object.        var state = (StateObject)ar.AsyncState;        // Read data from the client socket.         var bytesRead = _socket.EndReceive(ar);        // Below code doesn't decrypt correctly for wss        // but works correctly for ws        Utils.Encoding.GetString(state.Buffer, 0, bytesRead);

Viewing all articles
Browse latest Browse all 1501

Trending Articles