I am using the asp.net mvc web api and posting data from android but unable to post data
I am adding here the dummy url for some reasons.
API Code : this is the method to which i amsending data.
public ActionResult Match(IEnumerable<HttpPostedFileBase> MatchImage)
{
//Code here }
Android Post code
HttpClient client = new DefaultHttpClient();
String postURL = "http://dummyurl.com/api/Match/VerifyImage";
HttpPost post = new HttpPost(postURL);
List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("MatchImage",imageData));
UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params,HTTP.UTF_8);
post.setEntity(ent);
HttpResponse responsePOST = client.execute(post);
HttpEntity resEntity = responsePOST.getEntity();
if (resEntity != null) {
System.out.println("-------------------->>>"+EntityUtils.toString(resEntity));
}
Responce :
{"Message":"No HTTP resource was found that matches the request URI 'http://dummyurl.com/api/Match/VerifyImage'.","MessageDetail":"No type was found that matches the controller named 'Match'."}
Please help me..thanks