0

I am new to WCF. I have requirement to use same WCF for bothSOAPandJSON` format using post method.Is it possible or not. Please guide me.

Balagurunathan Marimuthu
  • 2,927
  • 4
  • 31
  • 44
Ilaya Bharathi
  • 93
  • 1
  • 14
  • 1
    Possible duplicate of [Hosting WCF soap and rest endpoints side by side](http://stackoverflow.com/questions/3366103/hosting-wcf-soap-and-rest-endpoints-side-by-side) – Ricardo Pontual Sep 16 '16 at 16:18

2 Answers2

0

You need to set up two endpoints. However, if at all possible I would advise using WebAPI for your JSON service. WCF's DataContractJsonSerializer is rather lacking and doesn't encode things (such as dates) quite right. You can hack in Newtonsoft's JSON.Net, e.g. http://itq.nl/replacing-wcf-datacontractjsonserializer-with-newtonsoft-jsonserializer/ but I'd only go that route if you have to.

Nethemas
  • 136
  • 1
  • 9
0

Yes, you can for sure. i did many a times.