Solved

Does WCF allows me to change client data by running WCF service hosted in Server?

Posted on 2012-04-08
4
396 Views
Last Modified: 2012-06-25
I  have ASP.NET application.
The client (aspx)  is analyzing  financial data  in order to make some very important decission.
It's very important to see always fresh data.
The point it that  while long work client  the data may be changed.
In our   application clent can know it when he is saving data (post back event)
Application  checks client data and data in Cash and says  to client , that  desiccation   could be wrong , cause  base data  were changed.
Application Cash is refreshed automatically by running WCF.
Is there some way to let all  WEB clients know that data are refreshed before they cal server ?
0
Comment
Question by:Yampolka
  • 2
4 Comments
 
LVL 20

Expert Comment

by:BuggyCoder
ID: 37821720
you need to use callbacks, but this works on TCP and other connection oriented bindings.
This way your client can implement the callback contract and service can call the callback method to tell the client that data has changed.

something like publish subscribe model, here is an example:-
http://msdn.microsoft.com/en-us/library/ms752254.aspx
http://www.codeproject.com/Articles/34333/Topic-based-publish-subscribe-design-pattern-imple
0
 
LVL 21

Accepted Solution

by:
tovvenki earned 500 total points
ID: 37822957
Hi,
I think you can create a duplex service and use it to contact the client.
See the following urls which might show you how it works and how to do it
http://weblogs.asp.net/dwahlin/archive/2008/06/16/pushing-data-to-a-silverlight-client-with-wcf-duplex-service-part-i.aspx

http://msdn.microsoft.com/en-us/library/cc645027(v=vs.95).aspx

I hope that this helps,

Thanks and regards,
Venki
0
 

Author Comment

by:Yampolka
ID: 37829407
I need  to have WEB client ( not windows client)

What we have :
1) we have all session ID in application cash  memory and associated URI  all our users , which teoretically are usingg our application

2) all .aspx net page have some hidden field , lets say isSomethingUpdated = false and Event _ onchange(isSomethingupdated) which occurs when  field  is changed

3)  when duplex woks   I will  know .

What I need  to send aynchronyously xmlHTTP request to all clesnts basing on SessionID
this  Request will update on the client siide all .aspx pages , making field  isSomethingupdated= true. In this case  Event _ onchange would be runnind.
can I do this? how?
0
 

Author Comment

by:Yampolka
ID: 37942167
The alternative of  Ajax polling could be "  Push HTTP :tech"   when client ( Browser ) connection is always "alive "( KeepAlive= true)
 Could somebody to tell  me how /when it's could be implemented  ?
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

In previous Articles, we have discussed how we can upload a file using .asmx web service and isolated storage space. Here, in continuation to the topic, I am going to discuss how we can use WCF for the same purpose. Steps: 1.Create the silverli…
Here I am going to explain creating proxies at runtime for WCF Service. So basically we use to generate proxies using Add Service Reference and then giving the Url of the WCF service then generate proxy files at client side. Ok, what if something ge…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now