Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

webHttp Vs enableWebScript, which should be used for WCF REST POST request?

Tags:

.net

wcf

What is the difference between webHttp and enableWebScript in WCF? Which should I use for a WCF REST POST request?

like image 694
Sreekanth Avatar asked Oct 28 '13 11:10

Sreekanth


1 Answers

To make your WCF service RESTful, you will have to use WebHttp along with WebHttpBinding

To access your service from AJAX pages, you will have to use enableWebScript. This is similar to adding [ScriptService] attribute in asmx services.

So if the service has to be restful, but you donot want to access it from AJAX, you dont have to include enableWebScript.

http://msdn.microsoft.com/en-us/library/bb924425.aspx

http://msdn.microsoft.com/en-us/library/bb675191.aspx

like image 74
Saranya Avatar answered Oct 02 '22 15:10

Saranya