自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

配置WCF服務(wù)HTTP-GET元數(shù)據(jù)交換方式案例分析

開發(fā) 后端
這里就配置WCF服務(wù)HTTP-GET元數(shù)據(jù)交換方式需要配置WCF服務(wù)的行為和基地址,客戶端可以根據(jù)基地址查看服務(wù)的元數(shù)據(jù)做出詳細(xì)的介紹。

WCF經(jīng)過長(zhǎng)時(shí)間的發(fā)展,很多用戶都很了解WCF了,這里我發(fā)表一下個(gè)人理解,和大家討論討論關(guān)于WCF服務(wù)元數(shù)據(jù)交換配置實(shí)現(xiàn)過程。WCF與其他面向服務(wù)技術(shù)之間(asp.net \j2ee Web Service技術(shù)等)最大的區(qū)別在于傳輸可靠性(Transport Reliability)與消息可靠性(Message Reliability)。傳輸可靠性(例如通過TCP傳輸)在網(wǎng)絡(luò)數(shù)據(jù)包層提供了點(diǎn)對(duì)點(diǎn)保證傳遞(Point-to-Point Guaranteed Delivery),以確保數(shù)據(jù)包的順序無誤。傳輸可靠性不會(huì)受到網(wǎng)絡(luò)連接的中斷或其他通信問題的影響。

#T#消息可靠性提供了端對(duì)端保證傳遞(End-to- End Guaranteed Delivery),確保消息的順序無誤。消息可靠性與引入的中間方的數(shù)量無關(guān),與網(wǎng)絡(luò)跳數(shù)(Network Hops)的數(shù)量也沒有關(guān)聯(lián)。消息可靠性基于一個(gè)行業(yè)標(biāo)準(zhǔn)。該行業(yè)標(biāo)準(zhǔn)為可靠的基于消息的通信維持了一個(gè)在傳輸層的會(huì)話。如果傳輸失敗,例如無線連接中斷,消息可靠性就會(huì)重試(Retries)功能。它還能夠自動(dòng)處理網(wǎng)絡(luò)阻(Congestion)、消息緩存(Message Buffering)以及流控制(Flow Control),根據(jù)具體情況適時(shí)調(diào)整發(fā)送的消息數(shù)。消息可靠性還能夠通過對(duì)連接的驗(yàn)證管理連接自身,并在不需要連接時(shí)清除它們。

配置WCF服務(wù)HTTP-GET元數(shù)據(jù)交換方式

需要配置WCF服務(wù)的行為和基地址,客戶端可以根據(jù)基地址查看服務(wù)的元數(shù)據(jù)。代碼如下:

  1. <service name="WcfServiceApp.WCFService" behaviorConfiguration="WcfServiceApp.WCFServiceBehavior"> 
  2. <host> 
  3. <baseAddresses> 
  4. <add baseAddress="http://localhost:8001/"/> 
  5. </baseAddresses> 
  6. </host> 
  7. </service> 
  8. </services> 
  9. <behaviors> 
  10. <serviceBehaviors> 
  11. <behavior name="WcfServiceApp.WCFServiceBehavior"> 
  12. <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> 
  13. <serviceMetadata httpGetEnabled="true"/> 
  14. <!-- To receive exception details in faults for debugging purposes, set the value below to true.Set to false before deployment to avoid disclosing exception information --> 
  15. <serviceDebug includeExceptionDetailInFaults="false"/> 
  16. </behavior> 
  17. </serviceBehaviors> 
  18. </behaviors> 

配置WCF服務(wù)完成以后,我們可以使用基地址在瀏覽器里查看服務(wù)的信息,效果如下圖:

基地址在瀏覽器里查看服務(wù)的信息   

責(zé)任編輯:田樹 來源: 博客
相關(guān)推薦

2010-03-02 10:50:57

WCF元數(shù)據(jù)交換

2009-11-06 10:45:47

WCF服務(wù)元數(shù)據(jù)交換

2009-11-09 17:17:31

WCF元數(shù)據(jù)交換

2009-11-06 10:25:34

WCF元數(shù)據(jù)交換

2010-02-26 14:12:27

WCF元數(shù)據(jù)

2009-12-22 16:14:01

WCF服務(wù)元數(shù)據(jù)

2009-11-05 16:21:51

WCF服務(wù)

2009-11-09 09:55:24

WCF學(xué)習(xí)筆記

2009-12-21 16:37:41

WCF獲取服務(wù)元數(shù)據(jù)

2009-11-06 10:01:07

WCF服務(wù)元數(shù)據(jù)

2009-11-09 16:14:49

WCF服務(wù)元數(shù)據(jù)

2010-02-26 14:05:57

WCF通信方式

2010-02-22 17:21:02

WCF消息交換

2009-07-01 09:43:40

WCF安全元數(shù)據(jù)

2018-08-31 21:00:39

數(shù)據(jù)交換模型數(shù)據(jù)模型應(yīng)用程序

2010-02-22 14:18:34

WCF服務(wù)驗(yàn)證

2009-11-09 17:30:20

WCF元數(shù)據(jù)

2010-01-15 10:19:42

數(shù)據(jù)交換技術(shù)

2019-11-22 08:40:19

ProtobufGo編程語言

2012-09-26 09:51:11

電子政務(wù)數(shù)據(jù)交換
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)