WCF入门-项目间调用服务
生活随笔
收集整理的這篇文章主要介紹了
WCF入门-项目间调用服务
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
練習(xí)WCF入庫,添加了一個WCF項目,同時添加了一個控制臺程序,在控制臺程序啟動時,調(diào)用WCF服務(wù),報錯。
控制臺程序代碼為:
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..."); }} }
?
轉(zhuǎn)載于:https://www.cnblogs.com/shanheng/p/6118177.html
總結(jié)
以上是生活随笔為你收集整理的WCF入门-项目间调用服务的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: centos7的网络设置
- 下一篇: 【miscellaneous】关于gst