简体   繁体   中英

WCF multi-session wsdualhttpbinding reconnect to server

I implemented a WCF service that will do some long task. It needs to provide client with notifications about current progress of that long task. It is working well so far, but the problem is:

When user closes the client app, and then open it again, client app should start receiving updates from server again about the task that is running.

There can be multiple tasks started by different users at the same time. So for example, client starts a process named "proc1" that will be 3 hours long, and after 15 minutes he closes the app. The process continues to work on server. After 30 minutes client starts the app again and then client app needs to start getting notifications about the process client has started 30 minutes ago. How can this be accomplished?

Thanks in advance.

You should save on client side some process id that can be used later to get progress of that process. Try using that process id to reconnect to the notifications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM