I'm curious is there a way from Python/IronPython to communicate with remote Silverlight application.What I'm looking for is a way to log into remote silverlight app and parse data, the way that Curl enables to log into remote website with Post request and get html.I know that Silverlight is not a simple web page and its not probably easy, but there's not many information on this particular problem.I read that IronPython have Silverlight support, but I don't know right now much about .net and wondering if I have hit a dead end.Thanks.
-
I think you might be able to use selenium for this... not sure though ... also I think this is probably too localized and likely to be closed...– Joran BeasleyCommented Sep 26, 2012 at 16:04
-
I don't think that selenium is what I'm looking for.It uses local firefox/chrome installation, but I suppose it would work for one user or two.It also creates new browser window which I don't need.I hoped to have this work as back-end to grab data from silverlight app and then pass it back to html.But thanks anyway.– ZedCommented Sep 26, 2012 at 16:22
-
You could use python-requests.org which has HTTP auth and cookie support.– John KeyesCommented Sep 26, 2012 at 16:27
-
I'm not sure that's it. python-request is a lib for Http-based requests, but I think I need some kind of silverlight runtime for this.– ZedCommented Sep 26, 2012 at 16:31
-
Doh! Obviously, sorry @Zed. I was basing it more on the Curl part of your question. Brain-fart re Silverlight.– John KeyesCommented Sep 26, 2012 at 16:36
1 Answer
Silverlight applications cannot run services, therefore you can't directly connect to a running Silverlight application.
However, Silverlight applications can talk to a webservice, and can use long polling for you to push data to it. See Dan Wahlin's post here: http://weblogs.asp.net/dwahlin/archive/2008/06/19/pushing-data-to-a-silverlight-client-with-a-wcf-duplex-service-part-ii.aspx
You'd basically write the equivalent of a Silverlight chat client, except when it receives chats, it will have to execute the commands you send it.
Given that IronPython can run on Silverlight, you can actually send python script to be executed on the silverlight client.