Question : wcf and (400) Bad Request

hi

When i sent a large mount of data using wcf i got the error

" The remote server returned an unexpected response: (400) Bad Request "

 the configuration in server side is as follows:

   
   
     
                        sendTimeout="00:01:00" receiveTimeout="00:10:00" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"
                 messageEncoding="Text">
       

     

   

   
              name="Services.Services">
        contract="Services.IServices">
         
           
         

       

        contract="IMetadataExchange" />
     

   

   
     
       
         
          ults="true"/>
       

     

   

 


and the client side is as follows:


   
     
                        sendTimeout="00:01:00" receiveTimeout="00:10:00" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"
                 messageEncoding="Text">
       

     

   

   
     
       
       

     

   

   
      http://localhost:3990/Services.svc" binding="basicHttpBinding"
            bindingConfiguration="BasicHttpBinding_IServices" contract="ServiceReference1.IServices"
            name="BasicHttpBinding_IServices" />
   

 


i followed many web postings including this one with no luck

http://forums.asp.net/t/1299246.aspx

i would appreciate any help in this

Answer : wcf and (400) Bad Request

On your server. your endpoint does not reference that binding configuration (in your case your custom binding BasicHttpBinding_Services).
Change  endopoints from:
  contract="Services.IServices">
to:
  bindingConfiguration="BasicHttpBinding_Services" contract="Services.IServices">

Note: Any particular reason you are using  basicHttpBinding instead of WsHttpBinding binding.
Random Solutions  
 
programming4us programming4us