Considerations for sending files to OpenFire using the AGSXMPP SDK

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.