Powered by Blogger.

Sunday, March 2, 2014

Tutorials on WCF in Asp.Net

Windows Communication Foundation (WCF) is an SDK for developing and deploying services on Windows.
Uses System.ServiceModel.dll in the System.ServiceModel namespace.
Also you can check out:

- How to find the difference in retrieving data with and without using index in sql server 2008?

- Modify table structure in GUI in Sql Server 2008

- Constraints in SQL Server 2008

- Transaction in SQL Server 2008

The services can be local or remote, developed by multiple parties using any technology, versioned independently, and even execute on different timelines. Inside a service, you will find concepts such as languages, technologies, platforms, versions, and frameworks, yet between services, only prescribed communication patterns are allowed. The client of a service is merely the party consuming its functionality. The client can be literally anything—a Windows Forms class, an ASP.NET page, or another service. Clients and services interact by sending and receiving messages. Messages may transfer directly from client to service or via an intermediary. With WCF, all messages are SOAP messages. WCF services may communicate over a variety of transports, not just HTTP. WCF clients may interoperate with non-WCF services, and WCF services can interact with non-WCF clients. In WCF the client never directly interact with the services rather uses proxy to forward calls to the services.On the same machine the client can consume services in the same app domain,across machine boundaries the client can interact with services in its intranet or across the Internet. WCF provides the client with the same programming model regardless of the location of the service,whether the client is in local machine or in remote.

In WCF, every service is associated with a unique address. The address provides two important elements: the location of the service and the transport protocol or transport schema used to communicate with the service. The location portion of the address indicates the name of the target machine, site, or network; a communication port, pipe, or queue; and an optional specific path or URI.
WCF provides the following transport schemas like: HTTP, TCP, Peer Network, IPC(Inter Process Communicatiion), MSMQ.
And the address will always be like: http://localhost:8001

Ex. TCP address:
net.tcp://localhost:8002/MyWCFService (with ip address)
net.tcp://localhost/MyWCFService (without ip address)

Also same port can contain 2 services like

Ex HTTP Address
http://localhost:8000 It also uses https for secure communications