通过 Net.TCP 绑定的 WCF RIA? [英] WCF RIA over Net.TCP binding?

查看:36
本文介绍了通过 Net.TCP 绑定的 WCF RIA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试提高 Silverlight 4 WCF RIA 应用程序的性能.由于它仅用于 Intranet,我认为从默认的二进制 HTTP 绑定切换到 Net.TCP 绑定可能会稍微提高性能.

I am trying to improve the performance of a Silverlight 4 WCF RIA application. As it's for intranet use only, I figured switching from the default binary HTTP binding to the Net.TCP binding might improve performance a bit.

但是,我很难获得一个简单的概念应用程序运行证明.我有:

However, I am having a hard time just getting a simple proof of concept application running. I have:

  • 将 conecpt 应用的证明从 Cassini 切换到 IIS (7)
  • 在 IIS 上添加了适当的绑定和启用的协议
  • 在我的 IIS 根目录中添加了一个 clientaccesspolicy.xml 文件

现在,当我像这样创建上下文时:

Now, when I create a context like so:

var context = new DomainService1(
new Uri(
    "net.tcp://localhost:4502/BusinessApplication/BusinessApplication2.Web/ClientBin/BusinessApplication2-Web-DomainService1.svc"));

...我收到以下错误:

... I get the following error:

The provided URI scheme 'net.tcp' is invalid; expected 'http'. Parameter name: via

现在我被难住了.据我所知,问题是需要告诉由自动生成的 WCF RIA 代码创建的客户端它要使用 Net.TCP 端点,但我不确定如何做到这一点.

Now I'm stumped. As far as I can tell, the problem is that the client being created by the auto-generated WCF RIA code needs to be told that it's to use a Net.TCP endpoint, but I'm unsure how to do that.

我找到了很多解释如何通过 Net.TCP 获取 WCF 服务的博客文章,但我还没有找到一篇关于 WCF RIA 的文章,而且我也找不到任何官方文档.所有这些解释都涉及对 web.config 文件的更改,这些更改似乎不适合 WCF RIA 应用程序.

I've found plenty of blog posts explaining how to get WCF services going over Net.TCP, but I haven't found a single one talking about WCF RIA, and I can't find any offical documentation either. All of those explanations involve changes to the web.config file that seem unsuited to a WCF RIA app.

有人可以向我解释如何配置它,或者向我指出一些文档吗?

Could some one please either explain to me how to get this configured, or point me at some documentation?

推荐答案

WCF RIA Services 依赖于 HttpContext,而 Net.TCP 绑定无法使用.

WCF RIA Services depends on HttpContext which is not available with Net.TCP binding.

至于性能问题,您能否再详细说明一下?什么是瓶颈查询/操作?数据的大小(实体大小 x 实体数量)是多少?您的性能要求与当前性能之间的差值是多少?

As for perf issues, could you elaborate a bit further? What is the bottleneck query/operation? What is the size of data (entity size x entity count)? What is the delta between your perf requirements and current perf?

也许还有其他不涉及 Net.TCP 的方法?

Perhaps there are other ways that don't involve Net.TCP?

谢谢.

迪内什

(WCF RIA 服务项目经理)

(WCF RIA Services Program Manager)

这篇关于通过 Net.TCP 绑定的 WCF RIA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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