tags:

views:

26

answers:

2

I downloaded the silverlight 4 socket application from the book "Pro silverlight 4 with c#" which is basically just a silverlight socket client and server application. The server is a console application and the client is a silverlight web applcation.

I can run the server and client fine on ONE computer, it shows that its connected and so on, but when i tried connecting to the server on a different computer (Local Network), it wont connect. Any idea??? Eventually i want to put this on the internet and go live, not local. When i run using visual studio development server, it shows localhost and port 1091, and i thoguth silverlight only uses port 5200 somthing.

A: 

Silverlight applications are only allowed to connect back to the site it was loaded from by default, much like Java and Flash does. If you need to communicate with another server, that server needs to explicitly allow it by running a policy service listening to port 943, or by serving a policy file over HTTP port 80. See http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx for the full details on how to implement this.

Freed
A: 

Have you added policy file to you "C:\inetpub\wwwroot"?
I used example from "Pro silverlight 3 with c#" and its work from internet and local.
I added policy file to "C:\inetpub\wwwroot", where my silverlight website was published and everything works fine.
Note that website published in the same machine where server application runs.
Hope this will help you.

Samvel Siradeghyan