Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
dear all,

i have developed window application to upload files through http.
now my doubt is if connection failure occurs during sending files what happens?is it possible to send the remaining after connection failure through http?

please clear my doubts.thanks in advance.
Posted

1 solution

It is not possible. The reason behind this is that http is a stateless protocol. When we send any request over http it creates a temporary session & maintain state for that request only. Once connection with server break, all the information on server is lost regarding state. The developer has to manually manage the state.


In this case when you are sending a file, the file uploaded in packets & server keeps it in memory till complete file is not uploaded. After receving If connection break, the server release memory & anything uploaded will be lost.

It is mandatory to upload once again.

I hope this would answer your query. Let me know if you need more clarity on this.
 
Share this answer
 
Comments
jai_mca 15-Dec-12 0:50am    
Thanks d2niraj..while sending file conection disconnected.half of the file sent.if we connect again the remaining file send or it will start from the begining?
d2niraj 17-Dec-12 5:17am    
if disconnected & you re-upload the file.. It will start again. Nothing would be retained between different sessions
jai_mca 17-Dec-12 6:50am    
thanks dear..

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