Click here to Skip to main content
13,093,254 members (76,238 online)
Rate this:
Please Sign up or sign in to vote.
See more:
i have developed one window application for upload files to http it possible to use session concept in window application?if connction failure occurs while uploding files my application need to send the remaining files only after the that only i am asking about how to use session for that?

thanks in advance
Posted 1-Jan-13 18:45pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

I cannot help wondering how people can ask this weird question again and again. Windows or any other applications other then Web application never need session support. Sessions were created for Web application only due to extremely limiting character of such applications: the HTTP protocol is stateless, and the whole lifetime of the application is spanned between an HTTP request and HTTP response. You probably develop some Web application (otherwise you would not ask such question), but I cannot believe you really understand how it works.

"Normal" (not Web applications) do not have this draconian limitation, so they don't need sessions.

However, it is very likely that you question is related to something very different from sessions. It might be about transactions. You need to learn what it is. Please see:[^],[^],[^].

Please read it. Starting to catch the idea?

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

session means set a timer and when it complete a given time slot it will auto logout user (stop all running process or terminate application) - so, you can use timer in that case...

for situation of connection failure occurs while uploding files...
you should maintain a table in database

add whole list of file to upload in database and set their default value 0
as a file uploaded successfully update table record for that file and change it's state to 1 from 0

so, when a failure occur when you restart app check database and start upload of files which have state = 0 (means not uploaded)

so, it will like a Queue and you can also provide to cancel button to cancel uploading

Hope it helped you!
Happy Coding!
Raje_ 2-Jan-13 1:10am
my +5.
Aarti Meswania 2-Jan-13 1:11am
Thank you! :)

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 2 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100