Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have similar problem, stated here - http://stackoverflow.com/questions/12043174/ftpwebrequest-timeout-too-long[^]
Is there any way to fix this...?
Posted
Comments
Herman<T>.Instance 28-Sep-12 5:54am    
what is a long time? Does the FTP Protocol specify a timelentgh ?
Kumar, Ravikant 28-Sep-12 6:14am    
If FTP server is not available then 'request.GetResponse()' method returns after ~20 sec even after setting the 'request.Timeout' value to 3 sec. I want to avoid this 20 sec delay if server is down. Timeout works fine if server is available.
Amund Gjersøe 28-Sep-12 7:37am    
When establishing connection, the Timeout is not used. The Timeout is just used when sending and receiving. Start a timer, and abort you connection attempt when your timer has elapsed.
Kumar, Ravikant 28-Sep-12 8:04am    
Had a thought abt it. Not a good workaround. Any other way?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900