From: LEM on
Hi all,

I'm trying to upload a file from my application to a web server
programmatically.
I'm not using WebClient() because I need to make it compatible with the
Compact Framework.

The problem that I have is the following.

If you call this function, it only works sometimes. For some reason I
get a 408 Timeout error when the function response =
request.GetResponse(); is called.

I understand that this could be an issue with the internet connection,
but why is not using the Timeout parameter that I specify?
Even if I set a timeout of 20 seconds, it will return that error like 2
or 3 seconds as soon as the function request.GetResponse(); is called.

Here is my function:

http://luisespinosa.com/temp/upload.cs


Thanks a lot for your help.