Skip to main content
Home Forums General Silverlight New Features in Silverlight 3 Socket Server
13 replies. Latest Post by m_peretz on October 31, 2009.
(0)
lars67
Member
4 points
8 Posts
03-22-2009 10:13 AM |
We are just testing Beta.3 and socket server functionality and cross domain files. but have some problems.We have made a financial application in Adobe Flex, and we are thinking of porting this to Silverlight, now that it is becomming mature and with a set of controls.
A problem though, our Streamserver runs on port 80, which the silverlight app. must connect to (since many banks does not have other ports than this open)The Streamserver also sends out a cross-domain file.:
<?xml version="1.0" encoding ="utf-8"?><access-policy> <cross-domain-access> <policy> <allow-from> <domain uri="*"/> </allow-from> <grant-to> <socket-resource port="80" protocol="tcp" /> </grant-to> </policy> </cross-domain-access></access-policy>
This doesn´t work. Any ideas? The documentation on the .NET is very confusion and of various quality
Thanks in advance
03-22-2009 10:17 AM |
For those interested This is the application in question:
http://www.softcapital.com/radarlite
The first think that happens when you connect, is that the streamserver sends out a cross-domain file giving access to port 80. But not in SIlverlight so far. :-(
andulvar
155 points
102 Posts
03-22-2009 12:12 PM |
Silverlight applications can only connect to sockets in the range 4502-4532. You cannot use port 80 for your application. There's a somewhat heated conversation on this topic here: http://silverlight.net/forums/p/81467/192712.aspx
03-22-2009 12:25 PM |
***
No reason for us to even consider porting to Silverlight parallelly with our Flex application. It would be a completely no-go not to use port 80 to access the stream. Much people would use our application during work hours, beeing at work, and other ports that web, FTP, STMP will be closed.Too-bad, we could have used the multi-thread capability of Silverlight which is not present in Flex.
codeblock
Contributor
4060 points
716 Posts
03-22-2009 1:07 PM |
If you need to use sockets ther is nothing to do.
But if you can change your transport you may consider the usage of a webservice.
But if you are talking about streams probably this is not your case.
What are you streaming?
03-23-2009 1:31 AM |
Hello Andrea
We are streaming stockquotes from a socket server.
03-23-2009 3:56 AM |
Have you seen the PollingDuplexhttp://petermcg.wordpress.com/2008/09/03/silverlight-polling-duplex-part-1-architecture/
HTH
davidezo...
5690 points
875 Posts
03-23-2009 11:10 AM |
Hi,
I've posted an updated example of Duplex support in SL3 here: http://www.davidezordan.net/blog/?p=935
Hope this helps.
03-30-2009 2:57 AM |
Hi
Thanks for your suggestions.
But it is simply not an option for us to start modifying our serverbase, this is standard socket servers, that has 3 different clients connected. We want to use standards that are not bound to OS´ses. So doing a WCF service, that is not released yet is not a viable option
We just hope that Msft realized that is is not neessary to make stricter restrictions that the one Adobe has imposed throught their Domain policies.
DonMoir
8 points
4 Posts
04-01-2009 7:44 AM |
Hi Lars, The lack of arbitrary socket ports is indeed silly. But even with Flash or even if SilverLight did support sockets over 80, you still need to support connections over HTTP. Some corporations behind proxies simply do not permit socket connections and you must go thru the proxy.
Here's a note for you: Flash in Internet Explorer has a problem with version detection. This is noted as Flash suddenly stops working in IE. It's not flash that has stopped working, it is the version detection that has stopped working.... Your site failed in IE because of it... saying you must install flash etc...
The version detection occurs in AC_RunActiveContent.js. You can read about my solution for the problem here:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=675&threadid=1436087&enterthread=y
Here is my own version of socket and HTTP connection support in the form of a Real Time Blog:
http://sms.pangolin.com/rtblog/
Don
04-06-2009 3:44 AM |
I've written a proof-of-concept project that explain how to tunnel socket ports in scenario like your.
http://www.silverlightplayground.org/post/2009/04/01/A-proxy-class-to-tunnel-Socket-channels.aspx
04-06-2009 2:17 PM |
Hi codeblock, I read thru your proof-of-concept. I have not written a single bit of Silverlight code but...
In my case the whole premise to connect out port 80. This is the least likely port to be blocked for sockets and not at all for HTTP.
As far as I can tell, you are assuming a client can connect out 943 etc. This is not necessarily the case. My server does not exist in the traditional web service back end so it can listen on port 80 just fine. It is quite happy to accept socket or HTTP connections. No need for it to listen on some other port such as 943.
My client code tries to connect out sockets first because it is the most efficient. If this fails it connects thru HTTP. This is a must for when behind a proxy that only allows HTTP connections. Now silverlight can also connect thru HTTP, so this is ok, but less efficient.
I could listen on any additional port as well but I have not need for it at this time. Java 1.6 and Flash allows you to connect out port 80 (socket or HTTP) cross-domain. It seems Silverlight should follow suit.
04-06-2009 4:33 PM |
No, Silverlight cannot connect to port 80 using sockets because this port is out of the allowed range. And Sockets really need to connect to port 943 before establishing a connection to an allowed port. I hope this limits will be removed but for now we have to play with them...
bye
m_peretz
5 points
9 Posts
10-31-2009 2:51 PM |
Polling duplex can not scale in web farm or even in a web garden...