Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
tsfaridi #1
User title: Taha Saghir
Member since Mar 2011 · 15 posts · Location: Quetta, Pakistan
Group memberships: Members
Show profile · Link to this post
Subject: an attempt was made to access socket in a way forbidden by its access permission
I am working on Silverlight....
I am using MatriX XMPP SDK for facebook chat integration. I am following http://www.ag-software.net/matrix-xmpp-sdk/matrix-develope… tutorial, under section 3.1 it talks about connecting to a XMPP server. I am using following details:
Username: My facebook username (http://www.facebook.com/username)
Password: My facebook password
Domain: chat.facebook.com
Port: 5222

But I am getting "An attempt was made to access a socket in a way forbidden by its access permissions" error. Kindly help me sorting it out.
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Please read about the Silverlight netork restrictions here:
http://msdn.microsoft.com/en-us/library/cc645032%28VS.95%2…

especially the following:
One additional restriction on using the sockets classes is that the destination port range that a network application is allowed to connect to must be within the range of 4502-4534. These are the only destination ports allowed by a connection from a Silverlight application using sockets. If the target port is not within this port range, the attempt to connect will fail. It is possible for a target server to receive connections on a port from this restricted range and redirect it to a different port (a well-known port, for example) if this is needed to support a specific existing application protocol.
Avatar
tsfaridi #3
User title: Taha Saghir
Member since Mar 2011 · 15 posts · Location: Quetta, Pakistan
Group memberships: Members
Show profile · Link to this post
Thank you for your response...
I have also tried with port 4503, but the problem persists. Can you please provide sample code. I am interested in connecting using SSL, as I have a browser session available.
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Facebook is running their XMPP server only on port 5222. And they run no BOSH connection manager. This means you are unable to connect Facebook from Silverlight directly because of these Silverlight restrictions. The only way to connect to Facebook is when you proxy all traffic, portmap the connections or use other similar technologies.

Alex
Avatar
Alex #5
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I have updated the Silverlight Client example to the latest sources. You should be able to login to Facebook from this example now.
see: http://matrix.ag-software.de/

Alex
Avatar
tsfaridi #6
User title: Taha Saghir
Member since Mar 2011 · 15 posts · Location: Quetta, Pakistan
Group memberships: Members
Show profile · Link to this post
Thank you Alex!!
Can you please do me the last favor..:).. Kindly give me the link to this source!
Avatar
Alex #7
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
the complete source is included with the MatriX for Silverlight download. The link I posted is the SilverlightClient example without any further modifications.

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: