日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

WCF - Versus Web Service

發布時間:2025/4/9 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 WCF - Versus Web Service 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

https://www.tutorialspoint.com/wcf/wcf_versus_web_service.htm

There are some major differences that exist between WCF and a Web service which are listed below.

這里總結了WCF和網絡服務之間主要的不同之處

  • Attributes?- WCF service is defined by ServiceContract and OperationContract attributes, whereas a web service is defined by WebService and WebMethod attributes.

  • Protocols?- WCF supports a range of protocols, i.e., HTTP, Named Pipes, TCP, and MSMQ, whereas a web service only supports HTTP protocol.

  • Hosting Mechanisms?- Various activation mechanisms are there for WCF hosting, i.e., IIS (Internet Information Service), WAS (Windows Activation Service), Self-hosting and Windows Service, but a web service is hosted only by IIS.

  • Services?- WCF supports a robust security, trustworthy messaging, transaction and interoperability, while a web service only supports security services.

  • Serializer?- WCF Supports DataContract serializer by employing System.Runtime.Serialization, whereas a web service supports XML serializer by making use of System.Xml.Serialization.

  • Tools?- ServiceMetadata tool (svcutil.exe) is used for client generation for a WCF service, while WSDL.EXE tool is used for generating the same for a web service.

  • Exception Handling?- In WCF, unhandled exceptions are handled in a better way by making use of FaultContract. They do not return to the client like in a web service as SOAP faults.

  • Has

?

1.特質:WCF服務由服務契約和操作契約定義,然而web服務是由WebService以及WebMethod屬性來定義的

2.協議:WCF支持一系列的協議,例如HTTP、命名管道、消息隊列,然而web服務僅僅支持HTTP協議

3.托管機制:wcf有各種可用的機制,例如IIS(互聯網信息服務)、WAS(windows激活服務)、Self-hosting(自托管)以及windows服務,但是webService僅僅支持IIS

4.服務:wcf提供了一個穩健的安全,可靠的消息,事務以及互操作性。然而webService僅僅支持安全服務

5.序列化器:wCF通過使用System.Runtime.Serialization提供數據契約序列化器,然而webservice是通過使用System.Xml.Serialization來支持XML序列化器的

6.工具:svcutil.exe被客戶端用來生成一個wcf服務,然而webservice使用WSDL.EXE工具

7.異常處理:在wcf中,未處理的異常會由faultContract來以一種較好的方式來處理。wcf并不會像webservice那樣將未處理的異常作為soap故障返回給客戶端

?

轉載于:https://www.cnblogs.com/chucklu/p/4628502.html

《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀

總結

以上是生活随笔為你收集整理的WCF - Versus Web Service的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。