How to define a service as REST based service in WCF?
Submitted by: AdministratorWCF 3.5 provides explicit support for RESTful communication using a new binding named WebHttpBinding.
The below code shows how to expose a RESTful service
[ServiceContract]
interface IStock
{
[OperationContract]
[WebGet]
int GetStock(string StockId);
}
By adding the WebGetAttribute, we can define a service as REST based service that can be accessible using HTTP GET operation.
Submitted by: Administrator
The below code shows how to expose a RESTful service
[ServiceContract]
interface IStock
{
[OperationContract]
[WebGet]
int GetStock(string StockId);
}
By adding the WebGetAttribute, we can define a service as REST based service that can be accessible using HTTP GET operation.
Submitted by: Administrator
Read Online WCF SDK Job Interview Questions And Answers
Top WCF SDK Questions
☺ | How to set the timeout property for the WCF Service client call? |
☺ | What are contracts in WCF? |
☺ | How to configure Reliability while communicating with WCF Services? |
☺ | What is binding and how many types of bindings are there in WCF? |
☺ | How to deal with operation overloading while exposing the WCF services? |
Top Application Program Categories
☺ | AutoCAD Interview Questions. |
☺ | Microsoft Office Interview Questions. |
☺ | Microsoft Outlook Interview Questions. |
☺ | Microsoft Excel Interview Questions. |
☺ | WPF Interview Questions. |