开发者

How to get a list of computers on the network and their IP addresses, using Silverlight?

how do you get the list of all the comp开发者_如何学运维uter names/ip address on your network using the Silverlight framework? Thank you!


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜