Not logged in. · Lost password · Register
Forum: MatriX RSS
Not able to Connect my XMPP server using silverlight sample application
Avatar
janak.darji #1
Member since Feb 2011 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Issue with XMPP Server Connection
Hello Readers,

I want to create Silverlight based chat appliaction using Matrix SDK. I have downloaded matrix for Silverlight and tried to connect with my XMPP server using sample application. I have setup ejabberd XMPP server on my machine and created users on the same. From the silverlight sample I am trying to connect my user using JID.

I have tried both the way using socket as well as using BOSH url but none of the way is working. I also gone through the similar forum post and tried the way they mention but still I am not able to get the application working. Following are the steps I am doing.

1. Downloaded and setup ejabberd XMPP server.
2. Create admin user
3. Set the port no within the Silverlight range instead of defaul 5222 port
3. Run the policy server from the MISC folder.
4. Opened the Silverlight sample and tried following code to connect my XMPP server

            XmppClient xmpp = new XmppClient();
            xmpp.SetUsername(login.Jid.User);
           

            xmpp.AutoPresence = true;
            xmpp.AutoRoster = true;
            xmpp.XmppDomain = localhost;
            xmpp.Username = login.Jid.User;
            xmpp.Password = login.Jid.Password;
            xmpp.Port = 4503;
            xmpp.Transport = Matrix.Net.Transport.Socket;
            xmpp.Status = "online";
            xmpp.Open();

5. Configured my application in IIS so that I can run it from localhost.
6. Opened silverlight login screen in browser
7. Provided username and password click on login is not doing anything even it is not showing in debug window also.

Please help me with the exact steps to configure the sample application as I am bit new in XMPP. Also suggest me exact steps for BOSH configuration on Windows XP and .Net
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
it looks correct what you are doing.
Have you tried to connect with an existing xmpp client to your server on the port 4503?
Do you see any debug in the policy server when you try to connect?

You don't have to use IIS. You can also create a static page for oyu silverlight app and load it from a file url.

Alex
Avatar
janak.darji #3
Member since Feb 2011 · 5 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

Thank you for support.

I have tried connection using libjingle XMPP client (Gtalk API) using same values and I was successfully connected. I haven't tried any web based XMPP client. Appreciate if you could suggest me any other web based client to check.

My ultimate goal is to develop web based Audio/Video chat application.

Request is coming to policy server. I have confirmed it by putting debug point as well as every time when I try to login the consol is showing is "Sending policy..." message. I assume this is correct.

I tried without IIS also still no luck. 

Janak
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Can you try to set also the Hostname property to the machine name, ip or localhost?
Are you subscribed to all error handlers to see if an error comes back?

Alex
Avatar
janak.darji #5
Member since Feb 2011 · 5 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

I tried the way you suggest, still no luck.

It is not going in any error handler. It seems nothing is work after connect. Debugger window also not showing any message.

Can you suggest me how can I debug the code to get with exact problem?

Best Regards,

Janak
Avatar
Alex #6
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you can't debug the code because MatriX is closed source.
Have you tried the latest dll from here: http://www.ag-software.net/download-directory/ => /downloads/MatriX/Silverlight/?
Can you check with a network sniffer to see whats happening?
Can be it be an IPv4 IPv6 issue?
I can also create a user account for you on our servers. Then you could test both sockets and BOSH.

Alex
Avatar
janak.darji #7
Member since Feb 2011 · 5 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

I will try to check with network sniffer. Fiddler is fine for this or any particular sniffer tool you are talking here?

it would be nice if you create my account so that I can try connecting your server.

Send me credentials once you done with the user creation.

I hope it will be success.

Best Regards,

Janak Darji
Avatar
Alex #8
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
sent you an email with the credentials.

Alex
Avatar
Alex #9
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In reply to post #7
Quote by janak.darji:
I will try to check with network sniffer. Fiddler is fine for this or any particular sniffer tool you are talking here?

Wireshark, Smsniff.....

Alex
Avatar
janak.darji #10
Member since Feb 2011 · 5 posts
Group memberships: Members
Show profile · Link to this post
Ignore my previous reply as it was submitted before I complete it.

I have tried the BOSH details provided by you, I am getting following error related to policy file.

"The requested URL /clientaccesspolicy.xml was not found on this server"

It seems it is checking for policy file on http://matrix.ag-software.de

In case I am able to connect successfully then can I use this Silverlight library for Audio/Video communication? Are there any limitation or constraint? Does it require Jingle?
Avatar
Alex #11
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by janak.darji:
I have tried the BOSH details provided by you, I am getting following error related to policy file.

"The requested URL /clientaccesspolicy.xml was not found on this server"

It seems it is checking for policy file on http://matrix.ag-software.de

sorry, my mistake. Bosh will not work in Silverlight from our server when the Silverlight app is not located also on our servers.
You can only try direct sockets on our server on port 4502

  1. xmppCon.XmppDomain = "ag-software.de";
  2. xmppCon.Hostname = "matrix.ag-software.de";
  3. xmppCon.Port = 4502;


Quote by janak.darji:
In case I am able to connect successfully then can I use this Silverlight library for Audio/Video communication? Are there any limitation or constraint? Does it require Jingle?

yes Audio and Video in XMPP requires Jingle. This is not implemented in MatriX. You have to extend it on your own.
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: MatriX RSS