Last post Jun 01, 2010 08:43 PM by srikanth_gollapudi
May 31, 2010 11:01 AM|esohier|LINK
Have you an idea to realize this problem:
I've a web services wich can invoke a pc on the internet when a new event has come.
How do I write the code?
Thanks for your help.
May 31, 2010 11:25 AM|srikanth_gollapudi|LINK
1) Create a webservice .asmx and on top of each method call that as [ScriptService]
2) while accessing on web page use scriptmanager to access
<asp:ScriptManager ID="_scriptManager" runat="server">
<asp:ServiceReference Path="StockQuoteService.asmx" />
May 31, 2010 11:26 AM|srikanth_gollapudi|LINK
check the below link for detailed example.Hope that helps
May 31, 2010 11:44 AM|esohier|LINK
Thanks for your help.
Can you tell me more details about this subject?
My web page on the Internet must be refresh when a web service has a new event.
How do I send this command?
May 31, 2010 02:19 PM|toas1|LINK
If your event arrives at the web server and and you then want to invoke a pc using a web service there is no "correct" way to do this since the HTTP protocol doesnt support pushing data to the client. But there are a few work arounds, you can "push" your
events using a hidden iframe on your page and catch them on the client side using java script. Take a look at
PushModule, its a free tool that makes this easy for you.
May 31, 2010 04:20 PM|srikanth_gollapudi|LINK
I agree, HTTP PUSH is one workaround.But, what you are requesting is an not an easy task , and as far i know its tought task on dot net to implement.For this you need to split spieces using framework tools and/or technologies and couple them on top of that.
For simple workaround,Use AJAX timers on webbased to check events at regular interval.That is the simplest way to done.
Jun 01, 2010 02:00 AM|toas1|LINK
an other solution that actually give you real push to your client is to use silverlight on your client. silverlight has support for pushing data to the client (since version 2 I think) without doing any polling, irames and stuff like that.
Jun 01, 2010 02:06 AM|esohier|LINK
Can you tell me how do I write the code under silverlight to do this?
Jun 01, 2010 02:35 AM|toas1|LINK
take a look at this post from DrDobbs:
and this on fron Dan Wahlin:
Jun 01, 2010 02:27 PM|srikanth_gollapudi|LINK
YES, i would agree sliverlight is right to go for this kind of scenario.For this you need to Create Socket Server which always listens to event activity and if some thing found then server pushes event to all http clients.
below is the link wich explains in detailed steps
Jun 01, 2010 02:32 PM|esohier|LINK
Thanks for your answers, I look yours codes and explainations.
But I've a problem. Is it possible to use a web service under .Net 2.0 and Silverlight like you describes for client?
Jun 01, 2010 04:06 PM|srikanth_gollapudi|LINK
Not on ver 2.0 ,Inorder to run sliverlight you need Dot net Framework 3.5 version(with SP1 intalled) or higher .
Jun 01, 2010 04:28 PM|esohier|LINK
If I use a web service on my server under .Net 2.0 and Silverlight client under .Net 4, that's doesn't work?
Jun 01, 2010 08:43 PM|srikanth_gollapudi|LINK
I don't think so.As far i knew, you have to use Framework 3.5 higher and Sliverlight 2 or higher.If you use .net 4.0 on Server , and it has backward compatability , but not other way around what you are looking for.