April 22nd, 2009, 04:16 AM
WCF Webservice using c# 3.5
i am developing a web service using wcf in c# 2008.i want to enable mtom (message transmission optimization) for the service. i enable mtom in the service, but when i generate proxy for the client,instead of messageEncoding="Mtom" it is set as messageEncoding="Text". and when i manually change it in the client config file and try to upload the file to service, it s throwing exception an HTTP error 415: "Media unsupported" . can anyone point me what is happening?
1. Both my service and client are developed using WCF in 3.5
2. i have set messageEncoding="Mtom" in the service.
3. But my generated proxy has messageEncoding="Text" instead of messageEncoding="Mtom".
4. without making any change i am able to upload file to service.
5. but when i change messageEncoding="Text" to messageEncoding="Mtom" in client and invoke the service method (UploadFile(.....)) it is giving me error an HTTP error 415: "Media unsupported" .
can anyone tel me why i am not able to set messageEncoding="Mtom" in the client config file and invoke the method?
thanks & regards,
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!