What is the best way to implement a callback scenario using WCF and ASP.NET MVC?

Posted by Mark Struzinski on Stack Overflow See other posts from Stack Overflow or by Mark Struzinski
Published on 2010-04-06T19:40:43Z Indexed on 2010/04/06 19:43 UTC
Read the original article Hit count: 138

Filed under:
|
|

I am new to WCF. I just finished reading Learning WCF and I think I've got a pretty good grasp of the fundamentals. I am adding functionality to a line of business app that runs on ASP.NET MVC entirely inside the corporate LAN. I am calling into a service that will also send me events as they occur (and not as responses to service calls). These events can occur at any point during the user's session. I have the service written, and it is able to pick up these events.

What would be the best way to deliver these events to the user? My initial thought is to run the WCF service in duplex mode over net TCP and implement the events as callbacks. Using this scenario, the best way I can think up to deliver the events to the user is a dictionary object stored in the session. The dictionary would be populated by the callbacks and polled on a set frequency for delivery via AJAX calls.

Has anyone dealt with this scenario? Is there a more efficient way to implement this?

© Stack Overflow or respective owner

Related posts about wcf

Related posts about asp.net-mvc