WCF部署到控制台 1.下面通过一个简单的服务示例来认识WCF1.新建项目,名称IBLL,解决方案名称WcfDemo,模板选择类库2.修改Class1.cs文件名称为 IUserInfoService.cs3.添加引用 System.ServiceModel4.修改IUserInfoService.cs代码如下: using System; using System.Collections.Generic; using System.Linq; using System.ServiceModel
说起wcf,一直以来总是直接创建wpf的应用程序,这样默认的宿主是IIS.如果想更换宿主,那么我们首先得创建wcf类库. 这个类库会自动创建一个app.config文件.到最后部署的时候,把它移到宿主的项目下.看看IService1.cs: using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; usi