tags:

views:

33

answers:

1

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
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
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
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
While creating the proxy I can specify the endpoint name like, Dim wsBinding As New WSFederationHttpBinding("endpoint name") right?
JJK