Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
Sheshagiri #1
Member since Jan 2017 · 13 posts · Location: India
Group memberships: Members
Show profile · Link to this post
Subject: Not-authorized error during presence request and send message
Hi,
I am creating a sample .Net Project to send message to other users.  I am using agsXMPP Library in .Net and OpenFire as my XMPP Server.  I am using the code attached in the file.  When I run this application, Authentication is happening during connection. 

But it is giving not authorized error for when the request for presence is done and also message is not received by other users.  Below is the error xml received in xmpp_OnPresence.

  1. <presence xmlns="jabber:client" type="error" to="openffire_fdnsname/85esfz5yqw">
  2.    <status />
  3.    <priority>5</priority>
  4.    <error type="auth" code="401">
  5.       <not-authorized xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" />
  6.    </error>
  7. </presence>

I am not able to identify where I am making the mistake.

Please help in identifying where I am doing wrong.
The author has attached one file to this post:
agsXMPPMessage.cs 4.4 kBytes
You have no permission to open this file.
This post was edited 2 times, last on 2017-01-18, 18:37 by Alex.
Edit reason: add code tags
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
please attach your complete Xml logs
Avatar
Sheshagiri #3
Member since Jan 2017 · 13 posts · Location: India
Group memberships: Members
Show profile · Link to this post
Hi Alex,
Thanks for asking me the logs.  When I logged the xml, I found that xmpp.Server was pointing the HostName of server instead of "XMPP Domain Name".  When I changed the Hostname to XMPP Domain Name, it started working and I am able to see the message sent/received on various users.
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