WCF:所需的最低客户端配置
客户端使用 WCF 服务所需的绝对最低配置是多少?
也许我错了,但在客户端上重述一堆真正应该由服务器上的服务定义和控制的设置值似乎不合逻辑。 MaxBytesPerRead 就是一个很好的例子。但是安全和其他设置呢?
在我看来,客户端只需要知道 ABC(端点地址、绑定类型和契约),然后让服务器确定其余的。我是不是偏离基地了?
What is the absolute minimum configuration required for a client to consume a WCF service?
Maybe I'm wrong, but it doesn't seem logical to restate a bunch of settings values on the client that should really be defined and controlled by the service on the server. A good example is MaxBytesPerRead. But what about security and other settings?
It seems to me that the client should only need to know the ABC's (endpoint address, binding type and contract) then let the server determine the rest. Am I off-base?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看一下 此链接,但请记住零配置有限制。例如,正如 Terry 所说,如果它看到“http”,它将使用 basicHttpBinding,因此如果您使用 REST,它可能会崩溃。
如果您使用的是 basicHttp(或其他支持零配置的绑定),那么我会说这是最低配置。
这不会将所有各种设置(例如 MaxBytesPerRead)复制到客户端。您仍然需要自己编码或配置它们。
Take a look at this link, but keep in mind that zero config has limitations. For example, as Terry said, if it sees "http", it's going to use the basicHttpBinding, so if you're using REST it will likely break.
If you are using
basicHttp
(or another zero-config capable binding) then I'd say this is the minimum configuration.This does NOT copy down all the various settings such as
MaxBytesPerRead
to the client. You'll still have to code or configure those yourself.