1. Sharmistha Chatterjee's Avatar
    I am trying to connect to a proxy from Windows Mobile 10 Application and retrieve https data by doing a sslupgrade:

    data to be retrieved https://news.google.com.

    I get the following error:

    The token supplied to the function is invalid (Exception from HRESULT: 0x80090308)

    Source code given below:


    Windows.Networking.HostName serverHost = new Windows.Networking.HostName(PROXY_IP);

    request = "CONNECT news.google.com:443 HTTP/1.0\r\nUser-Agent: NativeHost\r\nHost: news.google.com:443\r\nContent-Length: 0\r\nProxy-Connection: Keep-Alive\r\nPragma: no-cache\r\n\r\n";

    string serverPort = PROXY_PORT.ToString();

    await socket.ConnectAsync(serverHost, serverPort, SocketProtectionLevel.PlainSocket);

    Stream streamOut = socket.OutputStream.AsStreamForWrite();
    StreamWriter writer = new StreamWriter(streamOut);
    await writer.WriteLineAsync(request.ToString());
    await writer.FlushAsync();
    HostName destHost = new HostName("news.google.com");


    await socket.UpgradeToSslAsync(SocketProtectionLevel.Ssl, destHost);


    catch (Exception ex)
    Debug.WriteLine("Socket upgrade failed" + ex.Message);

    02-24-2017 07:19 AM

Similar Threads

  1. Distortion bug still there after ALL this time!!!
    By JCDiederiks in forum Windows Phones
    Replies: 4
    Last Post: 03-29-2017, 07:28 AM
  2. Windows 10
    By thomas oneill in forum Ask a Question
    Replies: 2
    Last Post: 02-23-2017, 10:47 PM
  3. Strange Windows 10 update
    By Windows Central Question in forum Ask a Question
    Replies: 1
    Last Post: 02-23-2017, 10:46 PM
  4. windows camera app not recording stereo audio properly
    By Windows Central Question in forum Ask a Question
    Replies: 0
    Last Post: 02-23-2017, 09:49 PM
  5. Mobo/CPU Upgrade & Windows 10
    By signal-2-noise in forum Windows 10
    Replies: 3
    Last Post: 02-23-2017, 05:25 PM