0

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

2
  • yes i am using wrong link to post here but actualy in my code it is correct Commented Jul 26, 2013 at 8:25
  • I know, just kidding. I am not an asp.net expert, but if you google "asp.net mvc web "No type was found that matches the controller"" there are some similar questions Commented Jul 26, 2013 at 8:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.