Solved

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

Posted on 2012-04-08
4
405 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
Configuring network clients can be a chore, especially if there are a large number of them or a lot of itinerant users.  DHCP dynamically manages this process, much to the relief of users and administrators alike!
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 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