malaikuangren

What is the purpose or drive to build thing like (xxx),How can it achieve the original goal of design?

2012年6月16日

Hosting a WCF service in a Windows Service

摘要: In my last post I explained how you could use WCF and MSMQ to respond to messages asynchronously. We've setup a class library with our service, a console application for our host and a console application for our client. In this post I'll explain how we can use the class library again for ho 阅读全文

posted @ 2012-06-16 20:35 malaikuangren 阅读(176) 评论(0) 推荐(0) 编辑
WCF and MSMQ

摘要: It's been a while since I blogged about one of my favorite topics, Windows Communication Foundation.In this article I'll explain how you can use MSMQ with WCF to really process messages asynchronously. It's unbelievable how easy this is. Read my completeWCF serieson how to set up your fi 阅读全文

posted @ 2012-06-16 20:34 malaikuangren 阅读(284) 评论(0) 推荐(0) 编辑
WCF Part 7 : Bindings

摘要: As I've been pretty busy, it's been a while since my last post in the WCFseries. But let's have a look at bindings now. A binding will tell a client what's necessary to connect to the service. In other words, how we connect is described by the binding. As you can see in the image, th 阅读全文

posted @ 2012-06-16 20:32 malaikuangren 阅读(208) 评论(0) 推荐(0) 编辑
WCF Binding decision chart

摘要: A while ago I saw this decision chart to helpchoose a WCF default binding. Unfortunately I cannot remember where it came from. The problem I had with it was that you could only reach wsHttpBinding if you had to use interop. But you might need to use HTTP for a transport. Also the local option came t 阅读全文

posted @ 2012-06-16 20:29 malaikuangren 阅读(220) 评论(0) 推荐(0) 编辑
WCF Part 6 : Address

摘要: We'll return once again to the WCF ABC and in this part we'll examine what we can do with the address of our service. There are many options on how to specify the address of your service, especially when you start combining options. But I'll discuss the three main options. Don't be s 阅读全文

posted @ 2012-06-16 20:26 malaikuangren 阅读(294) 评论(0) 推荐(0) 编辑
WCF Part 4 : Make your service visible through metadata

摘要: Last timewe saw how we could create an instance of our service by hosting it using some configuration in our app.config. We still need to have it exposed using metadata though. We'll do this by adding an endpoint that exposed this, using our WCF ABC again. This endpoint is called a MEX endpoint, 阅读全文

posted @ 2012-06-16 20:25 malaikuangren 阅读(137) 评论(0) 推荐(0) 编辑
WCF Part 5 : Consuming the service

摘要: Last timewe generated the client and configuration file. Whereas in the asmx world we had a proxy class, the WCF team renamed this in the June CTP to client. For us to use the generated files, we need a new console application and add the files. Don't forget to add the System.ServiceModel refere 阅读全文

posted @ 2012-06-16 20:25 malaikuangren 阅读(154) 评论(0) 推荐(0) 编辑
WCF Part 3 : Hosting the service

摘要: Finally .NET Framework 3.0RTM'd, so I don't have to run in my VMWare anymore. A good time to see if everything works and create the host fortheservice contractwe've created last time. We'll do this using a C# console application, as those just rock in simplicity.We need a ServiceHost 阅读全文

posted @ 2012-06-16 20:00 malaikuangren 阅读(167) 评论(0) 推荐(0) 编辑
WCF Part 2 : Defining contract

摘要: As seen in the previous article, we need an address, binding and contract to complete the WCF ABC. We'll start at the contract.A contract is definedexplicitly, via a class. Youadd a [ServiceContract] attribute to the class. All methods you want to expose in your service, you mark as [OperationCo 阅读全文

posted @ 2012-06-16 19:58 malaikuangren 阅读(157) 评论(0) 推荐(0) 编辑
WCF Part 1 : Services ABC

摘要: I want to begin with a conceptual explanation about services. A servicealways has at least one endpoint, but can have multiple. A client normally communicates with only one endpoint. A plain-old-webservice only has one endpoint and communicates via HTTP and Text/XML. The picture below shows a servic 阅读全文

posted @ 2012-06-16 19:56 malaikuangren 阅读(322) 评论(0) 推荐(0) 编辑
Beginning Introduce To WCF

摘要: 为了使读者对基于WCF的编程模型有一个直观的映像,我将带领读者一步一步地创建一个完整的WCF应用。本应用功能虽然简单,但它涵盖了一个完整WCF应用的基本结构。对那些对WCF不是很了解的读者来说,这个例子将带领你正式进入WCF的世界。在这个例子中,我们将实现一个简单的计算服务(CalculatorService),提供基本的加、减、乘、除的运算。和传统的分布式通信框架一样,WCF本质上提供一个跨进程、跨机器以致跨网络的服务调用。在本例中,客户端和服务通过运行在相同的同一台机器上不同进程模拟。WCF的服务不能孤立地存在,需要寄宿于一个运行着的进程中,我们把承载WCF服务的进程称为宿主,为服务指定宿 阅读全文

posted @ 2012-06-16 19:28 malaikuangren 阅读(170) 评论(0) 推荐(0) 编辑
Interesting thing with WF4 Activity Scheduling

摘要: firstly i will show you a certain of recursive program. pls see blow.undoubtedly, the program console will got a message like this ,and along with aSystem.StackOverflowException.but let 's see a kind of like this code in WF4 which use scheduling activity.publicclassInfiniteLoop:NativeActivity{pu 阅读全文

posted @ 2012-06-16 16:03 malaikuangren 阅读(405) 评论(0) 推荐(0) 编辑