开发者

In WPF projects, how to prevent WCF requests to be serviced by the UI thread?

Long delays in my W开发者_运维百科CF service implementation are blocking my WPF UI. When I make the methods run in a new thread the problem is solved, but I can't answer my clients synchronously this way. I think WCF is using the UI thread. How to prevent this?


Try to decorate your WPF Hosted WCF Service with

[ServiceBehavior(UseSynchronizationContext=false)]
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜