日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
WCF支持WebGet屬性相關(guān)應(yīng)用技術(shù)

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

看著別人把WCF服務(wù)和web請求結(jié)合一起用很爽,可是自己怎么也配置不出來(沒有用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> 

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


新聞標(biāo)題:WCF支持WebGet屬性相關(guān)應(yīng)用技術(shù)
分享網(wǎng)址:http://www.5511xx.com/article/cdjssii.html