Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 WCF 服务,它公开了多个操作合同。一份合同是上传一个大文件。所以我想为该方法使用 MTOM 消息编码,为其他方法使用文本编码?如何创建单一服务并使用文本和 MTOM 消息编码?
每个服务合同都必须在单独的端点上公开,因此对于您的上传文件合同,您可以使用 MTOM 编码定义具有绑定的端点,而对于其他合同,您可以使用文本编码定义具有绑定的端点。