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)]
精彩评论