Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
giedre #1
Member since Jan 2006 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: C# -- can't connect to GoogleTalk!
Hi,

I'm trying to write a winapp using C# (VS2005) that could connect to GoogleTalk. I've been looking at the examples in this forum to see what works, what doesn't. I tried to write my program exactly like JonJab's VB example, but my application won't connect to any server.

Does anyone have ideas? Or working examples in C#?
Any replies, English or Deutsch, would be appreciated :)
Avatar
Alex #2
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi,

did you download the latest library from the homepage or SVN?
The MiniClient sample works fine with gTalk if you update it to the latest library version which uses SRV records, or use the code from here:
http://www.ag-software.net/index.php?option=content&ta…

Alex
Avatar
giedre #3
Member since Jan 2006 · 2 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

yes, I have the library, but when I try to build the MiniClient sample, I get an error in the line

XmppCon.ClientSocket.OnValidateCertificate  += new Mono.Security.Protocol.Tls.CertificateValidationCallback (ClientSocket_OnValidateCertificate);

the error is this:

Cannot implicitly convert type 'Mono.Security.Protocol.Tls.CertificateValidationCallback' to 'System.Net.Security.RemoteCertificateValidationCallback'    frmMain.cs    95    114    MiniClient

 :(
Avatar
Alex #4
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Hi,

you have to build the MiniClient with the included binary version or update this callback to:

private bool ClientSocket_OnValidateCertificate(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors)
        {
            return true;
        }
or ping me by mail an i can send you a newer version of the MiniClient.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS