Page 1 of 1

WebClient UploadString and Refused to set unsafe header "Content-Length"

Posted: Sat Dec 10, 2016 11:48 am
by tomny
Dear JS-Support:
I use the WebClient UploadString method, error: Refused to set unsafe header "Content-Length".
I do not know how to solve, can help me?

Image006.png
Image006.png (35.1 KiB) Viewed 10857 times


Thank you.
Regards,
Tomny

Re: WebClient UploadString and Refused to set unsafe header "Content-Length"

Posted: Mon Sep 18, 2017 9:37 pm
by TaterJuice
I have been experiencing this issue lately. It causes my app to crash.

I see you posted this December, 2016 (10 months ago).

Did you ever find a solution?

It is my understanding, this is a CORS issue, and we should be able to set the server's "Access-Control-Expose-Headers:" to expose the "Content-Length" header, but this solution is not working for me.