i have my own rest API i am calling below code in my c# 3.5 framewok but this method does not call please help me
var json = JsonConvert.SerializeObject(objproperties);
string url = "http://localhost:3423";
using (WebClient client = new WebClient())
{
responseData = client.UploadString(url+"api/json/Cardpayment", json);
}
my REST API Method.
[System.Web.Http.AcceptVerbs("GET", "POST")]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public HttpResponseMessage Cardpayment(classProperties objproperties)
{
try
{
string myid = objproperties.myid;
}
}