WCF 學習文摘

來源:互聯網
上載者:User

標籤:

WCF:Windows Communication Foundation 

1、概念

  WCF是一個用於搭建面向服務的架構,可以通過它從一個服務終端以非同步訊息的方式發送資料到其他服務;

  WCF是一個基於訊息的通訊架構,採用基於終端(Endpoint)的通訊手段,終端由地址(Address)、綁定(Binding)和契約(Contract)三要素組成;

  服務寄宿的目的就是開啟一個進程,為WCF服務提供一個啟動並執行環境;

  松耦合是SOA的一個基本的特徵,WCF應用中用戶端和服務端的松耦合體現在用戶端只須要瞭解WCF服務基本的描述,而無須知道具體的實現細節,就可以實現正常的服務調用;

  WCF服務的描述通過中繼資料(Metadata)的形式發布出來,WCF中中繼資料的發布通過一個特殊的服務行為 ServiceMetadataBehavior 實現;

   每個WCF服務具有一個 *.svc 檔案,部署於IIS網站中,對WCF服務的調用體現在對 *.svc 檔案的訪問上,檔案僅包含一個ServiceHost指令(Directive),該指令具有一個必須的Service屬性和一些可選的屬性;

 

2、特性

3、實現

4、參考資料  

  What Is Windows Communication Foundation  

  Windows Communication Foundation

  《我的WCF之旅》博文系列匯總

  

 

Steps to create strong named assembly

Step 1 : Run visual studio command prompt and go to directory where your DLL located.

  For Example my DLL located in D:/hiren/Test.dll

Step 2 : Now create il file using below command.

  D:/hiren> ildasm /all /out=Test.il Test.dll 
  (this command generate code library)

Step 3 : Generate new Key for sign your project.

  D:/hiren> sn -k mykey.snk

Step 4 : Now sign your library using ilasm command.

  D:/hiren> ilasm /dll /key=mykey.snk Test.il

so after this step your assembly contains strong name and signed.

Jjust add reference this new assembly in your project and compile project its running now.

WCF 學習文摘

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.