Hi All
1. Server-side: I have a method that intends on receiving the byte[] from WebClient.UploadData but I can not seem to achieve this.
2. I have tried the following:
- System.IO.Stream which results in an error "Cannot create an abstract class".
- System.IO.MemoryStrem which results in an error "Timeouts are not supported on this stream".
- byte[] - The input parameter is null.
- Google, which took me in circles :(
Client-side code: Posting data using WebClient.UploadData
byte[] _data = Encoding.UTF8.GetBytes(parameters);
byte[] _result = client.UploadData(_URL, _data);
Server-side: Attempting to receive the data posted by WebClient.UploadData
public byte[] Receive_Data(Stream data)
{
...
}
public byte[] Receive_Data(MemoryStream data)
{
...
}
public byte[] Receive_Data(byte[] data)
{
...
}
I'm not sure what I doing wrong, please could someone point me in the right direction/alternative. All feedback is highly appreciated.
Notes: This being done in MVC
public class HomeController : Controller