What are the various address format in WCF?

Sunday, March 4, 2012

a)HTTP Address Format : http://localhost:
b)TCP Address Format : net.tcp://localhost:
c)MSMQ Address Format : net.msmq://localhost:

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

Explain Address,Binding and contract for a WCF Service?

Address: Where is the serivce available.
Binding: How to communicate with the service.
Contract: What will the service do.

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

How to define a service as REST based in WCF ?

By adding the WebGet attribute, we can define a service as REST based service that can be accessible using HTTP GET operation.
[ServiceContract]
interface IStock
{
[OperationContract]
[WebGet]
int GetStock(string StockId);
}

www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning

What are the differencec between Web Services and WCF ?

Sno
WebServices
WCF
1 Can send/receive messages using SOAP over HTTP Can send/receive using SOAP and any transport protocol like HTTP,
TCP, named pipes, and Microsoft Message Queuing (MSMQ), etc.
2 Can only be hosted in IIS and the security is limited. Can be hosted in IIS, self-host servers with console applications or Win NT
services or any other server.
3
Doesnt support

supports binary .NET – .NET communications, distributed transactions, WS-*
specifications, queued messaging and Restful communications.
4
Simple when compared to WCF
Little more work is needed


www.codecollege.NET|www.interviewsguru.com|The Encylopedia of Web Sites|Blogging and Earning
Blog Widget by LinkWithin