开发者

Server Progress in WCF RIA Services

开发者 https://www.devze.com 2023-04-10 11:39 出处:网络
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 e

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号