MS Big Launch

Microsoft Launch news

http://blogs.iis.net/bills/archive/2008/02/27/windows-2008-and-iis7-now-available.aspx

Advertisements

Life Cycle of Custom Controls

Thought of sharing the life cycle of custom control in ASP.NET. I hope it helps if someone has to add something please do leave a comment

controllifecycle.gif

Good Links on WCF

I wil keep on adding good links about WCF

  1. WCF Essentials
  2. ASP.NET WebServices V/s WCF
  3. Reliable Messaging
  4. Migrating ASMX to WCF

WCF: Hosting Service with multiple end points

In continuation of previous post regarding WCF, here goes another. In this post I will do step step explanation for hosting service using config file (remember this is the beauty of WCF, we don’t need to recompile to add multiple endpoints).

The assumtion is readers have already implemented the service contract. I will use a dummy class named IService for my explanation

  1. Create a instance of ServiceHost. 
    1. ServiceHost servicehost = new ServiceHost(typeof(Examples.ServiceImplementation));
  2. Use the Open to start listening.
    1. servicehost.Open();
  3. Now put the following in the App.Config file

config1.gif

Let me explain each of the element

  • The host element declares the base address for the endpoint. In this case its declaring two base address the http address and another one is the tcp address. The host address is used by the ServiceHost to listen on the respective port and address.

host.gif

  • There are three endpoints

http.gif

Each endpoint basically is collection of address, contract and binding. Here in the above case the address is not specified as we have already sepcified in the base address. The contract is Examples.IService and the binding is HTTP.

  • The second endpoint

tcp.gif

is the TCP endpoint for the same service. Smilar to the previous one this definess the endpoint as collection of Examples.IService as contract and binding as TCP and address is not mentioned and taken from the base address.

  • The last endpoint

mex.gif

is used by the client to generate the meta information about the Service. This  is standard and ideally should be there for each service.I hope the above helps in understanding this beautiful technology.

The author has 10+ years experience with Enterprise Poduct Development. He is also the Co-Founder of PCVITA. He have expertise in Enterprise Architecture, Enterprise Messaging Platform Migration, Email Archiving.