everyone. I'm programming with c# language and I have a problem with WebClient class. I downloaded an image by using method WebClient.DownloadData, it worked fine. But, WebClient.UploadData didn't. In details, I have a byte[] contains a image's content - named bytes, and an URL of image folder which I want to upload to - named filePath. then,
WebClient wc = new WebClient();
byte[] responseArray = wc.UploadData(filePath, "POST", bytes);
And it return back to me following error
System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.WebClient.UploadDataInternal(Uri address, String method, Byte[] data, WebRequest& request)
at System.Net.WebClient.UploadData(Uri address, String method, Byte[] data)
at System.Net.WebClient.UploadData(String address, String method, Byte[] data)
I also researched some solutions for this problem, however none of them worked for me. :( Please help! :-s