WCF入门-项目间调用服务
生活随笔
收集整理的這篇文章主要介紹了
WCF入门-项目间调用服务
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
練習WCF入庫,添加了一個WCF項目,同時添加了一個控制臺程序,在控制臺程序啟動時,調用WCF服務,報錯。
控制臺程序代碼為:
namespace WcfConsumer {class Program{static void Main(string[] args){using (ServiceHost serviceHost = new ServiceHost(typeof(testService))) { serviceHost.Open(); Console.WriteLine("WCF Service has started..."); Console.ReadLine(); serviceHost.Close(); } Console.WriteLine("The WCF Service has stopped..."); }} }
?
轉載于:https://www.cnblogs.com/shanheng/p/6118177.html
總結
以上是生活随笔為你收集整理的WCF入门-项目间调用服务的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: centos7的网络设置
- 下一篇: 【miscellaneous】关于gst