SilverlightShow: WCF NET.TCP Protocol in Silverlight Comments http://www.silverlightshow.net/ Silverlight articles, Silverlight tutorials, Silverlight videos, Silverlight samples SilverlightShow.net http://www.rssboard.org/rss-specification Argotic Syndication Framework 2008.0.2.0, http://www.codeplex.com/Argotic en-US estoychev@completit.com (Emil Stoychev) Re: WCF NET.TCP Protocol in Silverlight Hi,<br /> <br /> <br /> For creating a Silverlight chat application I can recommend the Ozeki VoIP SIP SDK. For sample source codes check this: www.voip-sip-sdk.com/p_257-silverlight-video-chat-example-voip.html<br /> <br /> <br /> The support team is also responsive so you can make your project even faster with the help of them.<br /> <br /> <br /> BR http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment7695 http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Mon, 19 Mar 2012 16:32:42 GMT RE: WCF NET.TCP Protocol in Silverlight disregard, I finally figured it out that I had to add the IP Address of the server into client local intranet zone.  Somehow the server uses IPv6 and wasn't working with localhost.  By adding the IP address, it stopped prompting for username password.  I will have to check with Admin guys as to why this is the case.  I also had to put the servername in the client config file.  http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment5650 alphalima http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Sun, 06 Mar 2011 17:56:39 GMT RE: WCF NET.TCP Protocol in Silverlight Setting the server/client config to either localhost or the servername keeps prompting me for username and password.  Do I need to do something else in IIS?  I only have windows authentication enabled.  I tried setting anonymous also, but the window security is still prompting.  What is weird is, when running in VS, browser it also prompts me for user name and password when I run it.  any ideas?  this is only happening with net.tcp apps. http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment5649 alphalima http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Sun, 06 Mar 2011 17:25:19 GMT RE: WCF NET.TCP Protocol in Silverlight 4 <p>Hi</p> <p>can i just have net.tcp as the protocol enabled on the service in IIS and not http. when i remove http it throws an error saying that the service could not be activated.</p> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment5415 Ben http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Wed, 02 Feb 2011 20:35:58 GMT RE: WCF NET.TCP Protocol in Silverlight 4 <p>You can find a working sample and explanation here:</p> <p><a href="http://blogs.msdn.com/b/carlosfigueira/archive/2010/07/25/enabling-cross-domain-calls-for-sl-apps-on-self-hosted-tcp-services.aspx">http://blogs.msdn.com/b/carlosfigueira/archive/2010/07/25/enabling-cross-domain-calls-for-sl-apps-on-self-hosted-tcp-services.aspx</a></p> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment5238 Roberto Dalmonte http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Wed, 05 Jan 2011 21:21:45 GMT RE: WCF NET.TCP Protocol in Silverlight 4 YES PLEASE, SHARE THE CODE. http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment5222 WE-NEED-CODE http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Mon, 03 Jan 2011 21:57:29 GMT RE: WCF NET.TCP Protocol in Silverlight 4 <p>Please give me the code   mbstu_sajib@yahoo.com</p> <p></p> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment5122 selim http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Sun, 19 Dec 2010 12:25:39 GMT RE: WCF NET.TCP Protocol in Silverlight 4 quite good guys. http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment5108 vivek http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Fri, 17 Dec 2010 09:47:39 GMT RE: WCF NET.TCP Protocol in Silverlight 4 <span class="Apple-style-span" style="text-align: left; widows: 2; text-transform: none; text-indent: 0px; border-collapse: separate; font: 12px/14px 'segoe ui', 'lucida grande', verdana, arial, helvetica, sans-serif; white-space: normal; orphans: 2; letter-spacing: normal; color: rgb(51,51,51); word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> <p style="margin-top: 0px;"><span class="Apple-converted-space"> </span>I have a working silverlight application that talks to a self-hosting TCP service wpf application.</p> <p style="margin-top: 0px;">This is the picture: intranet with n silverlight clients and 1 self-hosting TCP service wpf application that works as a server. Everything is wonderful if the clients are running on a windows machine, but I can't make the service work on a  MacBook Pro connected in the very same intranet. Everything looks fine:</p> <p style="margin-top: 0px;">I can ping the Macbook from the server machine, and I can ping back the server machine from the macbook. I can see the shared folders of the server machine from the macbook, nonetheless I can't see anything coming back from the wcf via net.tcp service.</p> <p style="margin-top: 0px;">My question is:</p> <p style="margin-top: 0px;">Is it possible at all a similar scenario (an intranet with Mac's and Pc's living together and using the same WCF service via net.tcp)?.</p> <p style="margin-top: 0px;">Do you have a hint of what could make it work?</p> <p style="margin-top: 0px;">Best Regards</p> <p style="margin-top: 0px;">Roberto Dalmonte</p> </span> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment5104 Roberto Dalmonte http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Thu, 16 Dec 2010 14:34:22 GMT RE: WCF NET.TCP Protocol in Silverlight 4 <p>Hi Roberto. </p> <p>You can configure WCF to work with two or more different bindings. You can specify different bindings for same WCF service in config file so you can have one binding for WPF and another for Silverlight and use same WCF service with no changes in code of WCF service.</p> <p>Thanks</p> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment4933 RadenkoZec http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Mon, 22 Nov 2010 12:10:51 GMT Cross platform (Windows & Mac) WCF-Silverlight app <p>Hi Radenko,<br /> my goal is to develop a cross-platform INTRANET application with the following components:<br /> 1) WCF Host running on WPF Windows application on a windows machine<br /> 2) Silverlight client hosted indifferently on a windows or mac machine.</p> <p>At the moment I have a working application with the following component:<br /> 1) WCF Host running on WPF Windows application on a windows machine<br /> 2) WPF client running on windows machine</p> <p>The WCF host is configured this way:</p> <p><br /> </p> <pre><div class="reCodeBlock" style="border:1px solid #7f9db9;overflow-y: auto;"><div style="background-color: #ffffff; font-family: consolas;"><span style="margin-left: 0px !important;"><code style="color: #000000;">String baseAddress = string.Format("net.<a href="tcp://localhost">tcp://localhost</a>:{0}/ArchiveEndpoint", port);</code></span></div><div style="background-color: #f8f8f8; font-family: consolas;"><span><code>              </code><span style="margin-left: 42px !important;"><code style="color: #000000;">NetTcpBinding binding = new NetTcpBinding(SecurityMode.None);</code></span></span></div><div style="background-color: #ffffff; font-family: consolas;"><span><code>              </code><span style="margin-left: 42px !important;"><code style="color: #000000;">XmlDictionaryReaderQuotas quota = new XmlDictionaryReaderQuotas();</code></span></span></div><div style="background-color: #f8f8f8; font-family: consolas;"><span><code>              </code><span style="margin-left: 42px !important;"><code style="color: #000000;">quota.MaxStringContentLength = quota.MaxArrayLength = quota.MaxBytesPerRead = binding.MaxBufferSize = Int32.MaxValue;</code></span></span></div><div style="background-color: #ffffff; font-family: consolas;"><span><code>              </code><span style="margin-left: 42px !important;"><code style="color: #000000;">binding.MaxReceivedMessageSize = Int32.MaxValue;</code></span></span></div><div style="background-color: #f8f8f8; font-family: consolas;"><span><code>              </code><span style="margin-left: 42px !important;"><code style="color: #000000;">binding.ReaderQuotas = quota;</code></span></span></div><div style="background-color: #ffffff; font-family: consolas;"><span><code>              </code><span style="margin-left: 42px !important;"><code style="color: #000000;">binding.TransferMode = TransferMode.Streamed;</code></span></span></div><div style="background-color: #f8f8f8; font-family: consolas;"><span><code>              </code><span style="margin-left: 42px !important;"><code style="color: #000000;">serviceHost = new ServiceHost(typeof(DataService));</code></span></span></div><div style="background-color: #ffffff; font-family: consolas;"><span><code>              </code><span style="margin-left: 42px !important;"><code style="color: #000000;">serviceHost.AddServiceEndpoint(typeof(IDataContract), binding, baseAddress);</code></span></span></div><div style="background-color: #f8f8f8; font-family: consolas;"><span><code>              </code><span style="margin-left: 42px !important;"><code style="color: #000000;">serviceHost.Opened += new EventHandler(OnServiceOpened);</code></span></span></div><div style="background-color: #f8f8f8; font-family: consolas;"><span><code>              </code><span style="margin-left: 42px !important;"><code style="color: #000000;">serviceHost.Open();</code></span></span></div></div></pre> <p><br /> </p> <p>My question:<br /> is it possible to configure the silverlight client to run against my existing WCF server? This way I might have both WPF clients running on windows machine, Silverlight clients running on either windows or mac machines.<br /> Thanks<br /> Roberto Dalmonte</p> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment4932 Roberto Dalmonte http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Mon, 22 Nov 2010 11:38:45 GMT RE: WCF NET.TCP Protocol in Silverlight 4 you`re the man!! thanks for the light http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment4074 ro http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Wed, 28 Jul 2010 09:15:08 GMT RE: WCF NET.TCP Protocol in Silverlight 4 windows xp vs2010 silverlight4 not well http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment3632 china liminghua http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Wed, 19 May 2010 08:34:07 GMT RE: WCF NET.TCP Protocol in Silverlight 4 <p>Hi Mark and Eugene,</p> <p>I don't know, I also couldn't find it. Probably it is not available for Silverlight.</p> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment3453 ppopadiyn http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Tue, 20 Apr 2010 15:45:46 GMT RE: WCF NET.TCP Protocol in Silverlight 4 I don't see it, either. Anybody? http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment3431 Mark http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Fri, 16 Apr 2010 21:47:28 GMT RE: WCF NET.TCP Protocol in Silverlight 4 Would anybody please tell me into which assempbly NetTcpBinding is included in VS2010 RTM? I expected to find it in System.ServiceModel but looks like it's not there.... http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment3425 Eugene http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Fri, 16 Apr 2010 00:33:15 GMT RE: WCF NET.TCP Protocol in Silverlight 4 You said you have to use IIS to provide a WCF service, but this is not necessary. WCF can run without IIS if you are using TCP as the protocol. On the other hand, if your using WCF RIA you will need IIS from what I can tell so far. I'm guessing there's a way to configure it to not require IIS but I have not had time to research further. http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment3357 Rick http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Tue, 06 Apr 2010 17:01:06 GMT RE: WCF NET.TCP Protocol in Silverlight 4 This is great! another cool additional features of Silverlight! Though in terms of performance and speed without the hassle of  ISS configuration and the like, I still consider using Silverlight implementation of the Berkely Socket Interface. http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment3332 Dex http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Tue, 30 Mar 2010 18:03:34 GMT RE: WCF NET.TCP Protocol in Silverlight 4 When using TCP from Silverlight 4 we need to use port in specific range from 4502-4534 because Silverlight TCP is build on top of sockets and has same network security restrictions. See <a href="http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx">http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx</a><div><a href="http://msdn.microsoft.com/en-us/library/cc645032(VS.95).aspx"></a>So on client side when we connect to Silverlight 4 app that uses TCP we must connect through some of these ports 4502-4534. If client has firewall maybe these ports are disabled in firewall by default or when we connect firewall it will ask to add exception. We can't assume that client will click yes to add exception in firewall for our app.</div><div><br /></div><div>I hope this helps.</div><div>  <br /><div><br /></div></div> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2870 RadenkoZec http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Sun, 03 Jan 2010 11:38:35 GMT RE: WCF NET.TCP Protocol in Silverlight 4 I don't understand the intranet and firewall requirements.<br /> <br /> If I build and deploy a WCF server that uses the required port range, and then deploy on a public web site a silverlight 4 app that talks to the WCF server, then are you saying that no one will be able to hit the service without messing with their firewall?<br /> <br /> Is it their windows firewall on their own computer or is it their home routers or does it have something to do with NAT (Network Address Translation)? Why wouldn't the silverlight app be able to initiate a duplex tcp connection with the server like anything else? http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2869 Bryan Livingston http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Sun, 03 Jan 2010 04:12:39 GMT RE: WCF NET.TCP Protocol in Silverlight 4 <p>Who can give me a video chat Demo for silverlight 4 .</p> <p>My Email : <a shape="rect" href="mailto:yu.zhenjiang@live.cn" shape="rect" originalPath="mailto:yu.zhenjiang@live.cn" originalAttribute="href"><span style="color: #1ca0f2;">yu.zhenjiang@live.cn</span></a>  .</p> <p>Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!</p> <p>^.^                    ~.~             #.#           @.@   </p> <p> </p> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2817 River http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Sat, 19 Dec 2009 05:52:27 GMT RE: WCF NET.TCP Protocol in Silverlight 4 <p> Hi  <a shape="rect" href="http://www.silverlightshow.net/Profile.aspx?userId=2487c3f9-6fec-4d0d-bdcc-b1de2286e92a" id="ctl00_cphMiddle_ContentPlaceHolderContent_itemComments_dlstComments_ctl10_hlnkCommentAuthor" shape="rect"><span style="color: #1ca0f2;">RadenkoZec</span></a> </p> <p>Do you have the video chat Demo for silverlight 4.</p> <p>If has; can you give me it ?</p> <p>my email :81552364@163.com</p> <p>Thanks   !!!</p> <p> </p> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2809 River http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Fri, 18 Dec 2009 10:32:42 GMT RE: WCF NET.TCP Protocol in Silverlight 4 finally! http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2807 Jan http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Thu, 17 Dec 2009 18:25:01 GMT RE: WCF NET.TCP Protocol in Silverlight 4 Thanks;RadenkoZec.<br /> This problem I have been solved,<br /> I really appreciate your help. http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2792 River http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Wed, 16 Dec 2009 13:10:50 GMT RE: WCF NET.TCP Protocol in Silverlight 4 Thanks , Hi  <a shape="rect" href="http://www.silverlightshow.net/Profile.aspx?userId=2487c3f9-6fec-4d0d-bdcc-b1de2286e92a" id="ctl00_cphMiddle_ContentPlaceHolderContent_itemComments_dlstComments_ctl10_hlnkCommentAuthor" shape="rect">RadenkoZec</a> , about you give me source code address ,I  thanks again .But I need  Silverlight net.tcp  Duplex communication, WCF Service is independent's Service , it's not  in Silverlight Service .Can you give me independent's WCF Service  ,and Silverlight4 net.tcp Duplex call. http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2789 River http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Wed, 16 Dec 2009 10:40:13 GMT RE: WCF NET.TCP Protocol in Silverlight 4 Hi River. You have sample chat application using net.tcp on Tomasz Janczuk blog (works at Microsoft)<div>http://janczuk.org/code/samples/pubsubsamplenettcp.zip</div> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2787 RadenkoZec http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Wed, 16 Dec 2009 09:52:32 GMT RE: WCF NET.TCP Protocol in Silverlight 4 <p>can you  give  me  a Demo  for silverlight 4 use wcf net.tcp  chat ?</p> <p>my Email :81552364@163.com </p> <p>thanks !!!!!!</p> http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2786 River http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Wed, 16 Dec 2009 09:46:30 GMT RE: WCF NET.TCP Protocol in Silverlight 4 Thanks http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2759 RadenkoZec http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Sat, 12 Dec 2009 12:29:19 GMT RE: WCF NET.TCP Protocol in Silverlight 4 Excellent http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2758 gavin whyte http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Sat, 12 Dec 2009 11:28:02 GMT RE: WCF NET.TCP Protocol in Silverlight 4 well done! http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx#comment2753 Catherine Russell http://www.silverlightshow.net/items/WCF-NET.TCP-Protocol-in-Silverlight-4.aspx Fri, 11 Dec 2009 16:34:58 GMT