Link to home
Start Free TrialLog in
Avatar of ajaikumarr
ajaikumarr

asked on

How to resolve timeout problem on Net.WebClient.UploadData?

Hai all,

I have a program which uploads 100k to 100mb files... It's working fine if the connection is LAN or > 56kbps line. When i try to upload 180k file using 36Kbps Dialup modem it fails to upload and says "time-out"... I searched on net for solution but no joys... I've seen a comment that this in ongoing problem right from VB6... Can somebody suggest me some way of overcome this problem... The code is running on VB.NET using the namespace Net.WebClient.UploadData. I've tried Net.WebClient.Uploadfile "PUT" method, but the files are getting corrupted on remote server as PUT method has some restrictions on upload size... I've tried "POST" method too but unfortunately my server does not support this method....

I'm trying HttpWebRequest to upload files... I'm not sure that this might solve my problems.... does any body having experience using HttpWebRequest to upload min of 20mb file using dialup connection?

PS :- My remote system is running 2000 server with IIS (does'nt have .NET in it).

Any code sample would help to move forward.
Thanks in advance.
Ajai Kumar .R
Avatar of dash420
dash420
Flag of Canada image

use
  Server.ScriptTimeout = <x> like Server.ScriptTimeout = 1000000 in the code behind file.

where x in second,
Avatar of ajaikumarr
ajaikumarr

ASKER

Hai Dash420,

>>The code is running on VB.NET using the namespace Net.WebClient.UploadData.<<
I'm writing it on VB.NET.

>>PS :- My remote system is running 2000 server with IIS (does'nt have .NET in it).<<
I dont have .NET installed on my server. so i can't use codebehind or server.scripttimeout....

Bye
Ajai
Ok,
Open inetmgr, right click on the vertual folder. Click on directory tab. Then click on the configuartion button. Then click on the App Options. You find Asp Script time out in second. default is 90 sec. Increase it to required second.


ASKER CERTIFIED SOLUTION
Avatar of ajaikumarr
ajaikumarr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ajaikumarr,

can you post the completed working code both for this application, as well as the receiving .aspx page?  I have a similar problem as can not seem to get past it.

TIA

kap
Hai Kapcreations,

I did this on VB.NET... If you think it would help you i can post it...

Bye
Ajai