Server Progress in WCF RIA Services
Can I 开发者_JAVA百科send progress updates from the server to the client when using time consuming wcf ria services?
Of course you can. It's not an out of the box solution anyway... All we know that every call that we make from Silverlight is async, so the client continue to respond regardless if there are pending requests.
That said, you can either make use of HttpPollingDuplex and use that sort of callback to notify your client or you can simply poll the server ar regular interval to obtain the current status of the operation.
Be aware that the server variable that holds the state should be ideally stored in ASP.NET Session and eventually accessed in a lock block cause you are writing it from a thread and reading it from another one
Hope this helps
精彩评论