My server is running Windows 2012 IIS 8.5 on a 10Gb link.
I have a custom aspx page to handle PUT request. This page is just sent data for testing speeds on mobile phone networks.
Code:
protected void Page_Load(object sender, EventArgs e)
{
//Set read Buffer Size to 64k (0x10000)
if (Request.RequestType == "PUT")
{
//Write to memory stream, instead of file
using (System.IO.MemoryStream PutStream = new System.IO.MemoryStream())
{
byte[] InBuffer = new byte[0x10000];
//read in memorystream in 64k chunks
int iBytesRead = Request.InputStream.Read(InBuffer, 0, InBuffer.Length);
while(iBytesRead>0)
{
PutStream.Write(InBuffer, 0, iBytesRead);
//next chunk
iBytesRead = Request.InputStream.Read(InBuffer, 0, InBuffer.Length);
}
WriteLog("Memory Stream length Bytes:" + PutStream.Length.ToString());
PutStream.Close();
}
}
When I try to upload the speed struggles to get above 230-300Mbits/s.
I'm sure I've missed something obvious!
Can anyone give me some pointers? Thank you.