I have a WCF service, which expose multiple operation contracts. One contract is to upload a large file. So I want to use MTOM message encoding for that method and text encoding for other methods? How do I create a single service and use text and MTOM message encoding?
A:
Each service contract has to be exposed on separate endpoint so for your upload file contract you can define endpoint with binding using MTOM encoding and for other contracts you can define endpoints with binding using text encoding.
Ladislav Mrnka
2010-09-28 17:32:57
So I need to have two different services (.svc file) right? Currently I have it like that, is there any other way than not creating separateend points?
JJK
2010-09-28 18:00:49
No you don't need two services. You need two endpoints for single service. It is done in configuration: http://msdn.microsoft.com/en-us/library/ms751515%28v=vs.90%29.aspx
Ladislav Mrnka
2010-09-28 18:09:19
On the client each exposed contract/endpoint is handled as "separate" service. So if you want to call methods from two contracts you need to create two proxies.
Ladislav Mrnka
2010-09-28 18:23:28
While creating the proxy I can specify the endpoint name like, Dim wsBinding As New WSFederationHttpBinding("endpoint name") right?
JJK
2010-09-28 18:28:41