HttpWebRequest.Timeout behaviour different in .Net / .Net CF?
During some tests on multipart upload (using Ethernet) i have found something interesting:
I set a short (17sec) HttpWebRequest.Timeout and simulate开发者_开发百科 a long upload using Thread.Sleep in the loop, where the byte-blocks are written to the server.
On a PC i get the timeout (RequestCanceled) but on .Net CF (Windows CE 5/6 Module) i dont get the timeout.
Does anyone has made the same observation ?
This is because the implementation of HttpWebRequest.Timeout in .Net CF does nothing:
// from C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.dll
public override int Timeout
{
get { }
set { }
}
精彩评论