Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
i have developed one window application for upload files to http server.is 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 disconnection.so that only i am asking about how to use session for that?
 
thanks in advance
Posted 1-Jan-13 18:45pm
jai_mca1.1K
Rate this: bad
good
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:
http://en.wikipedia.org/wiki/Transaction_processing[^],
http://en.wikipedia.org/wiki/Database_transaction[^],
http://en.wikipedia.org/wiki/Atomic_transaction[^].
 
Please read it. Starting to catch the idea?
 
—SA
  Permalink  
Rate this: bad
good
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!
Smile | :)
  Permalink  
v2
Comments
Raje_ at 2-Jan-13 1:10am
   
my +5.
Aarti Meswania at 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)



Advertise | Privacy | Mobile
Web04 | 2.8.141022.1 | Last Updated 2 Jan 2013
Copyright © CodeProject, 1999-2014
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