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

WCF支持WebGet屬性相關(guān)應(yīng)用技術(shù)

開(kāi)發(fā) 開(kāi)發(fā)工具
我們今天將會(huì)在這篇文章中以一段代碼示例的解讀來(lái)為大家詳細(xì)介紹一下WCF支持WebGet屬性的實(shí)現(xiàn)方法,幫助大家獲得一些幫助。

WCF開(kāi)發(fā)工具是由微軟開(kāi)發(fā)的一個(gè).NET Framework 3.5的重要組成部分。其中,它功能強(qiáng)大的優(yōu)勢(shì)在開(kāi)發(fā)領(lǐng)域中占據(jù)著重要地位。在這里我們會(huì)為大家詳細(xì)介紹一下有關(guān)WCF支持WebGet屬性的相關(guān)應(yīng)用。#t#

看著別人把WCF服務(wù)和web請(qǐng)求結(jié)合一起用很爽,可是自己怎么也配置不出來(lái)(沒(méi)有用web host),所以研究了一下wcf的binding的配置

endpoint的 binding必須為webHttpBinding.

Endpoint的behavior中要加入webhttp.

WCF支持WebGet屬性示例配置文件如下:

 

  1. < ?xml version="1.0" encoding="utf-8" ?>   
  2. < configuration>   
  3. < system.web>   
  4. < compilation debug="true" />   
  5. < /system.web>   
  6. < !-- When deploying the service library project, the content 
    of the config file must be added to the host's   
  7. app.config file. System.Configuration does not support config 
    files for libraries. --
    >   
  8. < system.serviceModel>   
  9. < services>   
  10. < service name="Services.PlayerService" behaviorConfiguration="bh">   
  11. < host>   
  12. < baseAddresses>   
  13. < add baseAddress = "http://localhost:8731/PlayerService/" />   
  14. < /baseAddresses>   
  15. < /host>   
  16. < !-- Service Endpoints -->   
  17. < !-- Unless fully qualified, address is relative to base 
    address supplied above --
    >   
  18. < endpoint address ="" binding="basicHttpBinding" contract=
    "Contrat.IPlayerService" behaviorConfiguration="web">< /endpoint>   
  19. < !-- Metadata Endpoints -->   
  20. < !-- The Metadata Exchange endpoint is used by the service 
    to describe itself to clients. --
    >   
  21. < !-- This endpoint does not use a secure binding and should 
    be secured or removed before deployment --
    >   
  22. < endpoint address="mex" binding="mexHttpBinding" 
    contract="IMetadataExchange"/>   
  23. < /service>   
  24. < /services>   
  25. < behaviors>   
  26. < endpointBehaviors>   
  27. < behavior name="web">   
  28. < webHttp/>   
  29. < /behavior>   
  30. < /endpointBehaviors>   
  31. < serviceBehaviors>   
  32. < behavior name="bh">   
  33. < !-- To avoid disclosing metadata information, set the value 
    below to false and remove the metadata endpoint above 
    before deployment --
    >   
  34. < serviceMetadata httpGetEnabled="True"/>   
  35. < !-- 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 --
    >   
  36. < serviceDebug includeExceptionDetailInFaults="False" />   
  37. < /behavior>   
  38. < /serviceBehaviors>   
  39. < /behaviors>   
  40. < /system.serviceModel>   
  41. < /configuration>  

 

以上就是對(duì)WCF支持WebGet屬性的相關(guān)介紹。

責(zé)任編輯:曹凱 來(lái)源: 博客園
相關(guān)推薦

2009-12-23 09:26:56

ADO.NET屬性

2010-03-10 13:59:40

Python異常處理

2009-12-23 17:18:45

WPF Attache

2009-12-29 10:22:34

WPF附加屬性

2009-12-29 10:11:56

WPF布局屬性

2010-01-11 15:43:06

VB.NET類(lèi)屬性

2011-08-16 15:04:15

交換機(jī)快速啟動(dòng)

2023-01-06 19:02:23

應(yīng)用技術(shù)

2011-05-30 09:17:18

光纖

2015-06-02 10:08:51

布線技術(shù)光纖

2009-12-21 18:10:50

WCF實(shí)現(xiàn)事件通知

2010-02-26 17:51:16

Silverlight

2010-03-11 15:01:52

Python源碼

2010-04-14 16:24:44

寬帶無(wú)線接入

2015-09-01 10:14:21

機(jī)房直冷優(yōu)化

2010-02-26 13:26:55

WCF消息編碼器

2010-02-04 17:05:53

C++動(dòng)態(tài)創(chuàng)建對(duì)象

2009-09-03 14:14:52

RHEL ASMySQLroot密碼

2021-09-13 14:39:34

云計(jì)算Edge云應(yīng)用

2010-02-23 10:57:34

WCF Streami
點(diǎn)贊
收藏

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