Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
vkanta #1
Member since Oct 2010 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: running sample applications
Hello to all,
i am new in silvehrlight, the question i need to ask is as follows. what do i need in order to run, the sample application successfully do i need to modify the code any?
i have an openfire setup i am trying to connect throught the standard ports.
i am using the silverlight client app.
the client does not seem to connect to openfire.

open fire is listening in the standard ports 5222 and 5223.
i just need to develop a simple xmpp client for moss with silverlight
thanks
Avatar
Alex #2
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you have to change the listening port of your Openfire server to a port within the Silverlight port range. Because the default XMPP ports are not in the Silverlight port range. Additionally you have to run a policy server, otherwise Silverlight allows no socket connection. This described in the MatriX developer guide, this blog post and in the Readme which ships with the SDK.

Alex
This post was edited on 2013-02-25, 22:33 by Alex.
Avatar
vkanta #3
Member since Oct 2010 · 5 posts
Group memberships: Members
Show profile · Link to this post
i have  done this allready i have changed the listening ports to 4502 and 4503

do i have to modify the code in the cmdLogin_Click mehod?
i only so a call to a deligate i have added the following code
 XmppClient xmpp = new XmppClient();
                    xmpp.AutoPresence=true;
                    xmpp.AutoRoster=true;
                    xmpp.Hostname=this.Hostname;
                    xmpp.Username=Jid.User;
                    xmpp.Password=this.Password;
                    xmpp.Port = 4502;
                    xmpp.Transport = Matrix.Net.Transport.Socket;
                    xmpp.Status = "online";
                    xmpp.Open();
should i take it out ?


if so what should i use to log in to the server suppose the server is runninh on localhost

for username i should supply user@localhost
password on the password field
where do i suply the connection port,4502, on your sample application?

with kind regards
Billy
Avatar
Alex #4
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by vkanta:
for username i should supply user@localhost

no, the username is user for this jid, and the xmppdomain is localhost.
Make sure that the policy server is running also on localhost before you can connect.

Alex
Avatar
vkanta #5
Member since Oct 2010 · 5 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #2
yeah i gathered all that. i changed te ports and all .
a policy server is anything available does it come  with my windows 2008? i have not seen it there. Where can i find one ?
Avatar
Alex #6
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by vkanta:
a policy server is anything available does it come  with my windows 2008? i have not seen it there. Where can i find one ?
There is a basic one which comes with the MatriX SDK in the misc folder. It should work fine for running the examples, and even for production pages. You can find more policy servers in the web.

Alex
Avatar
vkanta #7
Member since Oct 2010 · 5 posts
Group memberships: Members
Show profile · Link to this post
thanks for the ehlp xwith the policy server.
i think i got it working. how do i verify that the policy has been applied?
what do i have to do if my server is on another machine other from local host.

when i run the application thru visual studio
to test it i get no responce
Avatar
Alex #8
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by vkanta:
i think i got it working. how do i verify that the policy has been applied?
the policy server appends a line to the console window when a policy request was processed.

Quote by vkanta:
what do i have to do if my server is on another machine other from local host.
then you have to run the policy server on this machine or IP.

Alex
Avatar
vkanta #9
Member since Oct 2010 · 5 posts
Group memberships: Members
Show profile · Link to this post
noted . to clarify since your client is configured to work on local host
do i have to change the connection settings ?
Avatar
Alex #10
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you can change all properties in the source code.
Avatar
yon86 #11
Member since Oct 2011 · 2 posts
Group memberships: Members
Show profile · Link to this post
does this work for silverlight 4? I have been trying to run the sample applications..I have installed openfire  and have the policy server running and it is working properly but the client does not connect i used username user and also user@localhost both don't work I have successfully connected using the spark client and also have changed the port to 4502 help me please alex
Avatar
Alex #12
Member since Feb 2003 · 4328 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by yon86:
does this work for silverlight 4?

yes this works also fine on SL4.
Do you get any Xml log at all? If not then MatriX can probably not connect at all to your XMPP server because of policy, server, firewall or ip problems.

Alex
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