Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 通过XMPP Jabber网络订阅时出错_C#_.net_Xmpp_Agsxmpp - Fatal编程技术网

C# 通过XMPP Jabber网络订阅时出错

C# 通过XMPP Jabber网络订阅时出错,c#,.net,xmpp,agsxmpp,C#,.net,Xmpp,Agsxmpp,我正试图通过Jabber net将我的.net应用程序连接到xmpp服务器,以便进行事件处理。我无法订阅事件,并且不断出现错误 我使用matrix并能够连接到XMPP服务器。我不能在那里使用矩阵,因为我需要通过Jabber网络让它工作 我比较了两个库发送和接收消息,其区别如下: 矩阵: SEND: <iq id="MX_1" type="set" xmlns="jabber:client"> <bind xmlns="urn:ietf:params:xml:ns:xmpp-bi

我正试图通过Jabber net将我的.net应用程序连接到xmpp服务器,以便进行事件处理。我无法订阅事件,并且不断出现错误

我使用matrix并能够连接到XMPP服务器。我不能在那里使用矩阵,因为我需要通过Jabber网络让它工作

我比较了两个库发送和接收消息,其区别如下:

矩阵:

SEND:
<iq id="MX_1" type="set" xmlns="jabber:client"> <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>MatriX</resource>  </bind></iq>

RECV:
<iq type="result" id="MX_1" to="server9.host9.com/4bbc160" xmlns="jabber:client"> <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>3002@server9.host9.com/MatriX</jid></bind></iq>
发送:
矩阵
记录:
3002@server9.host9.com/母体
叽叽喳喳的网

Send:
<iq id="jn_1" type="set" to="XMPP_SERVER_IP"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Jabbernet</resource></bind></iq>

RECV
<iq type="error" id="JN_1" from=" XMPP_SERVER_IP " to="server9.host9.com/e5c0c0b8"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Jabber.Net</resource></bind><error code="400" type="modify"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
发送:
贾伯内特
记录
Jabber.Net

我知道两个请求有细微的变化。知道如何在Jabber Net中更正它吗?

您很可能切换了JabberClient.NetworkHost和JabberClient.Server。除非DNS设置不正确,否则不需要设置NetworkHost

Send:
<iq id="jn_1" type="set" to="XMPP_SERVER_IP"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Jabbernet</resource></bind></iq>

RECV
<iq type="error" id="JN_1" from=" XMPP_SERVER_IP " to="server9.host9.com/e5c0c0b8"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Jabber.Net</resource></bind><error code="400" type="modify"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>