91在线一级黄片|91视频在线观看18|成人夜间呦呦网站|91资源欧美日韩超碰|久久最新免费精品视频一区二区三区|国产探花视频在线观看|黄片真人免费三级片毛片|国产人无码视频在线|精品成人影视无码三区|久久视频爱久久免费精品

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

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
如何建立WCFIP相關客戶端

我在家里使用WCF做通訊,里面需要WCF做客戶端的IP,經(jīng)過在服務器上進行了修改,我卻發(fā)現(xiàn)WCF 3.0 里面并不支持這個功能。沒事上周在微軟官網(wǎng)下的3.5的新版WCF中提供了WCF IP這個方法。

創(chuàng)新互聯(lián)為企業(yè)級客戶提高一站式互聯(lián)網(wǎng)+設計服務,主要包括網(wǎng)站制作、成都網(wǎng)站建設、app開發(fā)定制、微信小程序開發(fā)、宣傳片制作、LOGO設計等,幫助客戶快速提升營銷能力和企業(yè)形象,創(chuàng)新互聯(lián)各部門都有經(jīng)驗豐富的經(jīng)驗,可以確保每一個作品的質量和創(chuàng)作周期,同時每年都有很多新員工加入,為我們帶來大量新的創(chuàng)意。 

不說廢話,直接看如何實現(xiàn)WCF IP。簡單定義一個WCF IP服務:

  
  
  
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Runtime.Serialization;
  5. using System.ServiceModel;
  6. using System.Text;
  7. using System.ServiceModel.Channels; 
  8. namespace ClientInfoSample
  9. {
  10. public class MyService : IService
  11. {
  12. public string GetData(string value)
  13. {
  14. OperationContext context = OperationContext.Current;
  15. MessageProperties essageProperties = context.IncomingMessageProperties;
  16. RemoteEndpointMessageProperty endpointProperty =
  17. messageProperties  [RemoteEndpointMessageProperty.Name]
  18. as RemoteEndpointMessageProperty;
  19. return string.Format("Hello {0}! Your IP address is {1} and your port is {2}",  value, endpointProperty.Address, endpointProperty.Port);
  20. }
  21. }
  22. }

分享題目:如何建立WCFIP相關客戶端
URL地址:http://m.jiaoqi3.com/article/dpjssoi.html