WebForms and timeouts / loss of session data

Discussion in 'ASP .Net' started by Billy Horne, Jul 16, 2004.

  1. Billy Horne

    Billy Horne Guest

    Hi - I need to write a basic order page for our web site. It is very
    straight-forward, in that we don't need a whole "shopping cart" system.
    Instead we just need a list of products displayed with a quantity field, and
    when they submit the form it then collects payment info, then they submit
    again and it charges their card. I plan to use a third party component to
    handle the credit card charging so that should be pretty easy.

    My main concern is how to best make a simple web form that the users can use
    to submit their orders. I have studied web forms and it looks ideal except
    for one MAJOR catch - the posted back data seems to timeout after x minutes.

    For example assume page 1 of the order form asks for quantities of each
    item. Then that is posted back and they get the customer information page
    next. Now, if they sit on that page for say an hour before doing anything
    when they continue and submit the form I think all the previously posted
    data is lost because the session times out, right? I assume I can bump the
    timeout, but what if they go home for the night and continue the next day or
    a long scenario like that?

    With this in mind, it seems like the traditional approach of just using
    regular home grown forms and managing posted data manually (i.e. the type of
    approach taken with classic ASP) has a great advantage in this regard. Am I
    right, or am I missing something? How can you best account for the
    possibility of long delays between each postback?

    Also while we are on the subject; can anyone recommend a sample that
    demonstrates how to make a basic ordering system like this. Like I
    mentioned above I am not looking for anything complex or anything that
    allows them to browse and add items to a cart and all that. Just need to
    have them say I want x of these, and x of those and here is my credit card.

    Bill
     
    Billy Horne, Jul 16, 2004
    #1
    1. Advertising

  2. On Thu, 15 Jul 2004 23:16:23 -0400, Billy Horne <> wrote:

    > Hi - I need to write a basic order page for our web site. It is very
    > straight-forward, in that we don't need a whole "shopping cart" system.
    > Instead we just need a list of products displayed with a quantity field,
    > and
    > when they submit the form it then collects payment info, then they submit
    > again and it charges their card. I plan to use a third party component
    > to
    > handle the credit card charging so that should be pretty easy.


    Yes, you'd need a home-grown solution. The problem with this scenario is
    what about the pricing, etc. of the products I've selected? What if they
    change either since I left the browser, or before I then end up checking
    out? Or quantities, do you hold them for me, or could they get bought
    while I'm gone? How do you handle that?

    BTW, I've never done ecommerce or needed this 'perpetual session', so
    that's the reason for the questions...

    This may be some overkill, but I'm sure there's some pointers you can find
    here:
    http://asp.net/Default.aspx?tabindex=8&tabid=47

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
     
    Craig Deelsnyder, Jul 16, 2004
    #2
    1. Advertising

  3. Billy Horne

    Billy Horne Guest

    > Yes, you'd need a home-grown solution. The problem with this scenario is
    > what about the pricing, etc. of the products I've selected? What if they
    > change either since I left the browser, or before I then end up checking
    > out? Or quantities, do you hold them for me, or could they get bought
    > while I'm gone? How do you handle that?


    These are good questions - thanks for asking. Our prices have not changed
    in over a year so I am not concerned about a price change. We sell software
    ESD so there is never a shortage or inventory to worry about. So there is
    no need for me to worry about those things.

    > This may be some overkill, but I'm sure there's some pointers you can find
    > here:
    > http://asp.net/Default.aspx?tabindex=8&tabid=47


    Thanks for the tip but definately overkill - no need for a whole shopping
    cart app - just a simple step 1) pick your quantities and items from a list
    on one page and submit, 2) enter your info and cc, 3) order confirmed.

    Its hard to imagine that all the flexibility and power of webforms goes
    right out the window if you need to make sure a user's session will not time
    out between postbacks as they move from page to page in the order system,
    like should they go to lunch in the middle or go home for the day and try
    and continue the next day. I would think there is a better solution than
    doing it the old-fashion class ASP way whereby you have the values passed in
    via hidden form fields individually.

    I was looking forward to the power of web forms and not having to worry
    about all that myself, but its looking like I have to do it myself the hard
    way. Bummer... Anyone have a solution for this that can still use
    webforms?
     
    Billy Horne, Jul 16, 2004
    #3
  4. Billy Horne

    Scott Allen Guest

    Hi Billy:

    >
    >Its hard to imagine that all the flexibility and power of webforms goes
    >right out the window if you need to make sure a user's session will not time
    >out between postbacks as they move from page to page in the order system,
    >like should they go to lunch in the middle or go home for the day and try
    >and continue the next day.


    It doesn't have to be that way if you keep session state in a
    database, which I realize is asking a lot if you are trying to keep
    the application as simple as possible. Still, the option exists and
    it's easy to configure - no code required.

    >I would think there is a better solution than
    >doing it the old-fashion class ASP way whereby you have the values passed in
    >via hidden form fields individually.
    >


    Unfortunately this is the way the web works. Web forms do a nice job
    of abstracting away this detail so you don't need to know this is
    happening underneath.

    --
    Scott
    http://www.OdeToCode.com
     
    Scott Allen, Jul 16, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Remer
    Replies:
    1
    Views:
    2,878
    Ken Cox [Microsoft MVP]
    Dec 30, 2003
  2. =?Utf-8?B?SmFzb24=?=

    forms authentication timeouts and session timeouts

    =?Utf-8?B?SmFzb24=?=, Jun 22, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    457
    =?Utf-8?B?SmFzb24=?=
    Jun 22, 2004
  3. mircu
    Replies:
    2
    Views:
    376
    mircu
    Jul 29, 2004
  4. peprom

    Session data loss during user logged session

    peprom, Aug 15, 2007, in forum: ASP .Net Security
    Replies:
    3
    Views:
    274
    Navneet khehra
    Sep 11, 2007
  5. David Shorthouse

    frameset and loss of session

    David Shorthouse, Jan 26, 2005, in forum: ASP General
    Replies:
    4
    Views:
    108
    David Shorthouse
    Jan 27, 2005
Loading...

Share This Page