Doing SSL on Windows8 Metro app

2

I am trying to do implement a simple C# XMPP client that can exchange messages with the facebook chat server. On the facebook chat api page(https://developers.facebook.com/docs/chat/), it specifies that the messages need to be send over TLS for the setup to be successful, which leads me to my problem. I cannot successfully do SSL/TLS in Win8 Metro.

So for doing SSL in Win8 Metro, I basically followed this site: http://msdn.microsoft.com/en-us/library/windows/apps/Hh780595.aspx

Here is what I have:

var socket = new StreamSocket();
var host = new HostName("chat.facebook.com");
await socket.ConnectAsync(host, "5222", Windows.Networking.Sockets.SocketProtectionLevel.Ssl);

So on the third line, I get the following error:

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

I am not sure exactly what this means. Does anyone have experience with this or know another way to successfully connect to the facebook chat server using SSL/TLS?

c#
ssl
microsoft-metro
asked on Stack Overflow Jul 30, 2012 by vincetagram

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0