I have a trouble about upload image from client android to webservice. In client , i convert image to base64 string. But my service can't receive this base64tring. 
I test service by Fidder and the error is : 400 bad request.

This my web.config : 





 
   
     
       

       
         

         

         

       
     
   
 


 
   
     
       
       

     

   

 

 
   
     
       
     

   

 

 
          providerName="System.Data.SqlClient" />
          providerName="System.Data.SqlClient" />
          providerName="System.Data.SqlClient" />
          providerName="System.Data.SqlClient" />
 

 
   
 



 
   
     
   

 

 
   
          multipleSiteBindingsEnabled="true" />
   
     
       
       
     

   

   
     
                          binding="webHttpBinding" 
                  contract="MyService.IMyService"
                  behaviorConfiguration="maxRequest">
         
           
         

       

       
     

   

   
     
       
         
       

     

     
         
           
           
           
       

     

   

 





and the webservice method (just to check webservice have receive of not.)


[WebInvoke(Method = "POST", UriTemplate = "/File", 
        RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml)]
        public bool UploadFile(Stream fileContents)
        {


            string email, itemtId, codeimg, format;
            using (StreamReader reader = new StreamReader(fileContents))
            {
                string[] separators = { "{\"", "\":\"", "\",\"", "\"}", "email", "format", "stringcodeimg", "itemid" };
                string contents = reader.ReadToEnd();
                string[] words = contents.Split(separators, StringSplitOptions.RemoveEmptyEntries);
                email = words[0];
                format = words[1];
                codeimg = words[2];
                itemtId = words[3];
            }


            return true;
        }