Asp.net Web API从图片发送字节数组给出404

Asp.net Web API从图片发送字节数组给出404,asp.net,asp.net-web-api,web-applications,asp.net-web-api2,Asp.net,Asp.net Web Api,Web Applications,Asp.net Web Api2,我需要帮助我的WebAPI。我在服务器中有以下内容: [System.Web.Http.HttpGet] public HttpResponseMessage Recognize(byte[] img) { } 我的客户要求: using (var client = new HttpClient()) { client.BaseAddress = new Uri("http://

我需要帮助我的WebAPI。我在服务器中有以下内容:

 [System.Web.Http.HttpGet]
        public HttpResponseMessage Recognize(byte[] img)
        { 

        }
我的客户要求:

  using (var client = new HttpClient())
            {

                client.BaseAddress = new Uri("http://localhost/MP.Business.Implementation.FaceAPI/");
                using (var request = new HttpRequestMessage(HttpMethod.Get, client.BaseAddress))
                {
                    var imageStream = new ByteArrayContent(pic);
                    var multi = new MultipartContent();
                    multi.Add(imageStream);

                    //   var response = client.
                    HttpResponseMessage response = client.GetAsync("api/Recognition/Recognize/"+ multi).Result;
断点未命中,我得到404。但是,如果我发送此请求:

 HttpResponseMessage response = client.GetAsync("api/Recognition/Recognize/").Result;

断点被命中,很明显我在里面得到了错误,因为字节[]为空(但至少命中了)。我做错了什么?

99%确定这应该是一篇文章而不是一篇文章,因为你发布的数据应该是client.PostAsync