Вопрос

I have a very simple Jabber client, which connects to Google Talk via our "Google Apps" domain account. The connect code is as simple as it gets:

 jc.User = "chatbot@ourdomain.com";
 jc.Server = "ourdomain.com";
 jc.Password = "password";
 jc.OnMessage += new MessageHandler(jc_OnMessage);
 jc.OnDisconnect += jc_OnDisconnect;
 jc.OnConnect += jc_OnConnect;        
 jc.Connect();

This has been running fine for a couple of years, but today it's suddenly stopped working: after the Connect(), I get the exception

A first chance exception of type 'netlib.Dns.DnsException' occurred in netlib.Dns.dll

Additional information: DNS query fails

followed by

A first chance exception of type 'System.FormatException' occurred in System.dll

Additional information: An invalid IP address was specified.

I know that Google have indicated that XMPP support is perhaps going away, but I can still connect to the account in question using a "proper" XMPP client.

I've tried changing the Server property to different settings, including:

xmpp-server.l.google.com

alt1.xmpp-server.l.google.com

talk.google.com

but all give the same result.

Does anyone know why this error is suddenly biting me, and what I can do to resolve it?

Это было полезно?

Решение

After literally hours of fiddling around, I've figured out that changing

jc.User = "chatbot@ourdomain.com";

to

jc.User = "chatbot";

solves the issue. Quite why it's worked for years, and has now suddenly stopped, is beyond me - I guess Google flipped a switch somewhere. Problem solved anyway, hopefully this will help someone else.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top