I am working on Silverlight....
I am using MatriX XMPP SDK for facebook chat integration. I am following this 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:
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.

Dani AI

Generated

was right to check for a port conflict, and since already looked for stray processes, the next checks should isolate whether this is an OS/firewall problem or a Silverlight/security restriction.

  • Run an elevated netstat to see which local sockets are in use (for Windows, netstat -ano) and map any matching PID with Task Manager or Process Explorer/TCPView. Some services run as SYSTEM and are easy to miss unless you run the tool as administrator.
  • Temporarily disable local firewall/antivirus (or add an explicit allow rule for your host process) and retry. If disabling fixes it, re-enable and create a precise allow rule rather than leaving protection off.
  • Reproduce the same connect code outside Silverlight (a small console app or server-side test). If the console app connects but the Silverlight version fails, the cause is almost certainly the Silverlight sandbox or a missing socket policy file. If neither works, the problem is at the OS/network level.
  • Capture traffic with Wireshark while attempting the connect. If no SYN leaves the machine, something local prevented the call. If a SYN leaves and you get an immediate RST, the remote side or an intervening firewall is refusing the connection. The packet trace plus the SocketException stack trace are the most useful artifacts.

If the fault is Silverlight-related, use an HTTP-based fallback (BOSH) or a server-side proxy that speaks XMPP on behalf of the browser client. Also enable debug logging in the MatriX library and collect the full exception stack plus the OS-level evidence (netstat/TCPView output and a packet capture) before contacting the library vendor; those logs make root-cause analysis far faster.

Recommended Answers

All 2 Replies

One cause of this error is having something else already running that is trying to use the same port. Check your processes and make sure you don't have something running that shouldn't be (like previous versions of your software).

Otherwise, I'd contact the creators of the XMPP library you are using.

Thank you for your response! There is no such process... I have already checked that...in early debugging!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.