开发者

WCF different endpoint per method?

Is it possible to restrict a method in WCFService to only respond to a particular endpoint?

e.g. I have a service that has multiple methods, one of which will be receiving a file. I have exposed two endpoints, one using MTOM.

Is it possible to only allow MTO开发者_StackOverflow中文版M for the "file" method.

If the end user wants to use MTOM for all the other calls, that their call, but I need to insist on it for the "file" method.


I believe that bindings can be specified at the ServiceContract level only. I think you would need to create a separate ServiceContract containing the method you want to use a separate binding for, then specify in the service configuration that it is to use a binding that utilizes MTOM encoding. You could go further and create a custom binding that only allows MTOM encoding.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜