Thursday, 25 June 2015

Can't find [WebInvoke] and [WebGet]

Need to add the reference System.ServiceModel.Web.dll and import the namespace System.ServiceModel.Web by using below statement using System.ServiceModel.Web; Then it will work.


[WebInvoke(BodyStyle = WebMessageBodyStyle.WrappedRequest, RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]


[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/Save")]



No comments:

Post a Comment

Thanks for comments.