WCF: Minimum client configuration required
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开发者_C百科 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?
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.
精彩评论