如何为Wpf应用程序提高Wcf服务性能 [英] how to Imporve the Wcf Service Performance for Wpf Application

查看:72
本文介绍了如何为Wpf应用程序提高Wcf服务性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,请任何人帮助我,

i使用wcf服务创建wpf应用程序,我以前使用BasicHttpBinding,但是在localHost中数据加载是正常的,但实时数据加载非常低,数据库FroM其他国家,我的数据加载非常慢,所以我会做什么改变,以便在basichttpbinding或wshttpbinding中快速数据检索,在IIs中使用服务主机,并使用Http。

解决方案

这里需要考虑很多事情。单个答案可能无法涵盖所有​​内容。



选择正确的绑定配置完全取决于您的客户端(WPF)和服务(WCF)的通信方式。看看下面的一些链接,它们可以帮助您识别正确的绑定和配置。



http://blogs.msdn.com/b/rickrain/archive/2012/05/20/which-wcf- binding-is-best.aspx



http://msdn.microsoft.com/en-us/library/ms733769.aspx



如果您的客户(WPF)和服务(WCF)驻留在同一台机器上然后 netNamedPipeBinding 将是一个不错的选择。



此外你还可以考虑 Chunking 你的留言。

http ://msdn.microsoft.com/en-us/library/aa717050(v = vs.110).aspx



http://msdn.microsoft.com/en-us/library/ms733742.aspx


http://stackoverflow.com/questions / 8225736

/数据中的WCF服务传送大量之

Hi All , pls any one Help me,
i created wpf application with wcf Service , i used to BasicHttpBinding Now, But data loading is normal in localHost, but data loading is Very Low in Live, Database FroM Other Country,my data loading is very slow , so what i will do change for fast data retrieve in basichttpbinding or wshttpbinding, service host in IIs, and using Http.

解决方案

Their are many things needs to have consideration here. And single answer may not cover everything.

Selection of the right binding configuration totally depends on how your Client(WPF) and Service(WCF) are going to communicate. Have a look at few links below which should help you in identifying right binding and configuration.

http://blogs.msdn.com/b/rickrain/archive/2012/05/20/which-wcf-binding-is-best.aspx

http://msdn.microsoft.com/en-us/library/ms733769.aspx

In case if your Client(WPF) and Service(WCF) residing on the same machine then netNamedPipeBinding would be a good choice.

Moreover you may also consider Chunking of your message.
http://msdn.microsoft.com/en-us/library/aa717050(v=vs.110).aspx

http://msdn.microsoft.com/en-us/library/ms733742.aspx

http://stackoverflow.com/questions/8225736/transfer-large-amount-of-data-in-wcf-service


这篇关于如何为Wpf应用程序提高Wcf服务性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆