I’m trying to make a POST or PUT request to a WCF Service from IE and Fiddler but I’m receiving this error. HTTP/1.1 411 Length Required. So in IE and Fiddler, how do I add the Content-Length to my request?
Cheers,
Mike.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Found the answer,
You can’t add Content-Length to a URI when typed into a browser, “because by default it will perform a GET”!!! To add Content-Length to your header you must use a debugging tool, e.g.. Fiddler or build a form or some other type of client!
In fiddler you simply type Content-Length: 0 in the “Request Headers” section of the “Request Builder” and it will magically work! As seen near the bottom of this tutorial:
http://blog.donnfelker.com/2008/12/04/how-to-rest-services-in-wcf-3-5-part-2-the-post/