tags:

views:

43

answers:

2

Hi, how do you get the list of all the computer names/ip address on your network using the Silverlight framework? Thank you!

A: 

Since Silverlight is a client technology that is heavily sandboxed (for the most part, though you can create elevated trust environments and COM interop), I don't think that Silverlight alone is going to be able to survey the network to see what computers/ip devices are on it.

Most likely, you'd want to create a web service on the same domain from which the Silverlight app will be served. This web service could be built to survey the network on which it resides (and not the network to which the client is downloaded...that would be a security concern). The web service could then relay information down to the Silverlight Client to provide data about the network.

Ben McCormack
This will be for an app for the upcoming Windows phones... I'm prototyping an app and want to know if it is possible with the current version of Silverlight to do right now.
Arash
A: 

Doing any time of local network scan with Silverlight 3 is just not really possible. Silverlight 3 simply does not have that type of low-level network support. Well, it kind of does, but there are some severe restrictions. Silverlight 3 can open up a socket within a restricted range of ports to any address in the cross-site policy, or obviously to its origin site. This really doesn't help trying to find local machines.

Silverlight 4 will allow a relaxed networking sandbox which would allow you to open sockets (or web service calls). I guess you could then try to do some sort of search of addresses in the client machine's subnet to look for "local" computers. Silverlight is going to have to play with the same networking rules as any other device on a network, so if traffic is segmented out with switching technology then you are pretty much SOL trying to do anything too advanced, unless you can authenticate and use some network appliance or server that would give your Silverlight app the required information.

Jason Jackson