I have a WCF application with SOAP and RESTful end points which I followed from this tutorial.
everything was working great I could call basicHttpbinding
data. Now I am trying to call data from the RESTful
side, I received this error when coding the
Error 1 'System.ServiceModel.Web.WebGetAttribute' does not contain a definition for 'Method'
the error is shown here:
[OperationContract]
[WebGet(Method = "GET", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = "getTrucksA")]
List<RTrucks> GetTrucksA();
I did check out this question on Stack Overflow and tried all answers like
Removing
using System.ServiceModel.Web
and adding it again.Adding Reference
changing the Framework target in my project settings
but nothing works.
any ideas?