摘要: 阅读全文
posted @ 2013-10-15 21:19 feidaochuanqing 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 通过LiveWriter提交 阅读全文
posted @ 2013-10-11 16:32 feidaochuanqing 阅读(98) 评论(0) 推荐(0) 编辑
摘要: -------------------ICustomer(接口类)------------------------------------[ServiceContract] public interface ICustomer { [OperationContract] [TransactionFlow(TransactionFlowOption.Allowed)] int RegisterCustomer(Customer customer);//注册一个客户 }------------------IRental(接口类)-----... 阅读全文
posted @ 2013-10-11 13:50 feidaochuanqing 阅读(215) 评论(0) 推荐(0) 编辑
摘要: -------------interface---------------------- /// /// 租赁合同管理 /// [ServiceContract] public interface IRental { [OperationContract] [FaultContract(typeof(RentalRegistFault))] string RegisterCarRental(RentalRegistraction rentalRegistraction);//注册一个租赁合同 [OperationContract] [FaultContract(typeof(RentalR.. 阅读全文
posted @ 2013-10-11 10:39 feidaochuanqing 阅读(265) 评论(0) 推荐(0) 编辑
摘要: ----------clientProxy------------------class CarRentalPrxoxy:ClientBase,IRental { public CarRentalPrxoxy() :base("RentalServiceEndPoint") { } #region IRental 成员 public string RegisterCarRental(RentalRegistraction rentalRegistraction) { return Channel.RegisterCarRental(rentalRegistraction); 阅读全文
posted @ 2013-10-10 15:31 feidaochuanqing 阅读(519) 评论(0) 推荐(0) 编辑
摘要: -------interface-------------[ServiceContract] public interface ICarManagement { [OperationContract] int InsertNewCar(Car car);//插入一辆汽车 [OperationContract] bool RemoveCar(Car car);//移除一辆车 [OperationContract] void UpdateMilage(Car car);//更新里程 [OperationContract] List ListCars();//获得所有的车辆信息 [Operatio. 阅读全文
posted @ 2013-10-10 15:26 feidaochuanqing 阅读(173) 评论(0) 推荐(0) 编辑
摘要: --------------------------static ServiceHost CarManagementServiceHost; static ServiceHost CustomerServiceHost; static ServiceHost RentalServiceHost; static ServiceHost ExtentalServiceHost; static void Main(string[] args) { CarManagementServiceHost = new ServiceHost(type... 阅读全文
posted @ 2013-10-10 15:24 feidaochuanqing 阅读(286) 评论(0) 推荐(0) 编辑
摘要: WCF服务端和客户端如果传递的参数是复杂类型而且没有使用DataContract标签那么客户端对复杂类型的所有的公开属性都可见。服务端配置文件Host类ServiceHost host = new ServiceHost(typeof(CarRentalService));host.Opened += new EventHandler(host_Opened);host.Open();Console.Read();版本控制:对外的服务发布了一版之后然后对服务进行升级,就是版本控制问题:wcf什么情况下用不同的序列化的方式DataContract?XmlSerilize 阅读全文
posted @ 2013-10-10 15:21 feidaochuanqing 阅读(135) 评论(0) 推荐(0) 编辑
摘要: ISchedulersched;voidApplication_Start(objectsender,EventArgse){//在应用程序启动时运行的代码BundleConfig.RegisterBundles(BundleTable.Bundles);AuthConfig.RegisterOpenAuth(); ISchedulerFactorysf=newStdSchedulerFactory();sched=sf.GetScheduler();//新建一个调度员 //新建一个jobJobDetailjob=newJobDetail("job1","grou 阅读全文
posted @ 2013-09-24 23:19 feidaochuanqing 阅读(220) 评论(0) 推荐(0) 编辑
摘要: private void button1_Click(object sender, EventArgs e) { X509Certificate2 cert = new X509Certificate2(@"c:/ze.pfx", "limingze"); WR.WebService1 ws = new WindowsFormsApplication1.WR.WebService1(); System.Net.ServicePointManager.ServerCertificateValidationCallback = new System.Net. 阅读全文
posted @ 2013-08-09 17:47 feidaochuanqing 阅读(416) 评论(0) 推荐(0) 编辑