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

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

新聞中心

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

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

創(chuàng)新互聯(lián)為企業(yè)級客戶提高一站式互聯(lián)網+設計服務,主要包括網站制作、成都網站建設、app開發(fā)定制微信小程序開發(fā)、宣傳片制作、LOGO設計等,幫助客戶快速提升營銷能力和企業(yè)形象,創(chuàng)新互聯(lián)各部門都有經驗豐富的經驗,可以確保每一個作品的質量和創(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相關客戶端
文章路徑:http://www.5511xx.com/article/dpjssoi.html