简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM