Using AGSXMPP to send files to OpenFire has been plagued by service-unavailable errors, detailed errors as shown in fragment 1-1. With the demo Miniclient project that comes with AGSXMPP, you can send files normally but fail to send them in your own project.
Episode 1-1
<iq xmlns= "jabber:client" to= "[email Protected]/xmppdemo" id= "agsxmpp_5" type= "error" ><si xmlns= "/http Jabber.org/protocol/si "id=" A3536b74-8a75-4ce2-9d84-59088b31bba3 "profile=" Http://jabber.org/protocol/si/profile /file-transfer "><file xmlns=" Http://jabber.org/protocol/si/profile/file-transfer "name=" Data.xlsx "size=" 9688 "><range/></file><feature xmlns=" Http://jabber.org/protocol/feature-neg "><x xmlns=" Jabber:x:data "type=" form "><field var=" Stream-method "type=" List-single "><option><value>http ://jabber.org/protocol/bytestreams</value></option></field></x></feature></si ><error type= "Cancel" code= "503" ><service-unavailable xmlns= "Urn:ietf:params:xml:ns:xmpp-stanzas"/ ></error></iq>
Specific steps:
1, build the OpenFire server, ensure that 5222, 7777 ports are normal, in the server settings are enabled "file Transfer agent."
2, OpenFire configuration 1-1, set the correct xmpp.domain, such as im.openfire.com, to ensure that the domain name can be ping.
Figure 1-1
3. Modify the const string Proxy in File FrmFileTransfer.cs = "proxy.ag-software.de" as const string proxy = "Proxy.im.huiyaosoft.com", Where the domain name must follow the proxy. style.
4. When sending a file, you must specify Jid. Resource, otherwise report a 503 error, as shown in fragment 1-2:
Episode 1-2
Jid Jid = new Jid (username + xmppdomain); Jid. Resource = xmppcon.resource;frmfiletransfer ft = new Frmfiletransfer (Xmppcon, Jid);
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Considerations for sending files to OpenFire using the AGSXMPP SDK