偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

WCF配置指定Address具體實(shí)現(xiàn)方法介紹

開(kāi)發(fā) 開(kāi)發(fā)工具
WCF配置指定Address的相關(guān)操作方法將會(huì)在這篇文章中通過(guò)幾段代碼示例為大家詳細(xì)接受,初學(xué)者可以通過(guò)此充分掌握這一應(yīng)用技巧。

在對(duì)WCF進(jìn)行實(shí)際操作時(shí),對(duì)于Address的相關(guān)應(yīng)用是一個(gè)非常重要的操作技術(shù)。那么我們今天將會(huì)在這篇文章中,為大家詳細(xì)介紹一下有關(guān)WCF配置指定Address的相關(guān)實(shí)現(xiàn)技巧,希望能給大家?guī)?lái)一些幫助。

相對(duì)地址

  1. < host> 
  2. < baseAddresses> 
  3. < add baseAddress = "http://localhost:8731/" /> 
  4. < /baseAddresses> 
  5. < /host> 
  6. < endpoint address ="Service1" binding="basicHttpBinding" 
    contract="Wcf_Address_Config.IService1">< /endpoint> 

這個(gè)WCF的實(shí)際地址:

http://localhost:8731/Service1

絕對(duì)地址

  1. < host> 
  2. < baseAddresses> 
  3. < add baseAddress = "http://localhost:8731/" /> 
  4. < /baseAddresses> 
  5. < /host> 
  6. < endpoint address ="http://localhost:8731/Service" 
    binding="basicHttpBinding" contract="Wcf_Address_Config.IService1"> 
    < /endpoint> 

是絕對(duì)地址的時(shí)候,baseAddresses就不起作用了,實(shí)際地址就是endpoint中設(shè)置的地址

在網(wǎng)上有人說(shuō)絕對(duì)地址是通過(guò)將httpGetEnabled設(shè)置為true,并且設(shè)置httpGetUrl為絕對(duì)地址是在設(shè)置endPoint的說(shuō)法有些不準(zhǔn)確,因?yàn)樵赪CF中有兩種地址,一種是訪問(wèn)endPoint時(shí)候用到地址,另外一種是服務(wù)描述的地址,服務(wù)描述在wcf中被稱作serviceMetadata,通過(guò)它能夠產(chǎn)生代理類,比如,我們做如下的設(shè)置:

  1. < serviceMetadata httpGetEnabled="True" 
    httpGetUrl="http://localhost:8731/Service"/> 

只代表在http://localhost:8731/Service/?wsdl上能找到服務(wù)描述,可以通過(guò)http://localhost:8731/Service/?wsdl生成代理類,而不是將endPoint的地址設(shè)置為了http://localhost:8731/Service,這點(diǎn)一定要注意,不要受有些說(shuō)法的誤導(dǎo)。

【編輯推薦】

  1. WCF路由截獲消息技巧應(yīng)用總結(jié)
  2. WCF behavior不同級(jí)別及類型總結(jié)
  3. WCF行為控制實(shí)質(zhì)內(nèi)容簡(jiǎn)要概述
  4. WCF異步調(diào)用正確實(shí)現(xiàn)方法講解
  5. WCF集合類型各種限制于規(guī)則介紹
責(zé)任編輯:曹凱 來(lái)源: 博客園
相關(guān)推薦

2009-12-22 17:30:47

WCF Address

2009-12-21 16:04:45

WCF Dispose

2010-02-23 14:48:38

WCF事件通知

2010-03-01 17:39:07

WCF Address

2009-11-05 10:30:41

WCF Address

2010-02-24 16:39:27

WCF客戶端處理

2009-12-21 13:06:05

WCF Address

2010-02-22 17:07:50

WCF綁定元素

2009-12-22 15:02:40

WCF限流

2010-02-25 16:52:12

引用WCF服務(wù)

2010-02-23 10:51:32

WCF Address

2009-11-05 10:37:58

WCF Address

2009-12-16 15:04:26

Ruby實(shí)現(xiàn)strea

2010-02-22 11:02:06

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

2010-02-25 18:42:04

WCF端點(diǎn)配置

2010-02-24 09:38:58

WCF應(yīng)用編碼

2010-02-22 15:13:04

WCF分布式事務(wù)

2009-12-21 17:40:25

WCF會(huì)話

2010-02-23 17:05:38

2010-02-25 16:07:28

WCF REST
點(diǎn)贊
收藏

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