Solved

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

Posted on 2012-04-08
4
425 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Preface There are many applications where some computing systems need have their system clocks running synchronized within a small margin and eventually need to be in sync with the global time. There are different solutions for this, i.e. the W3…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 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