Forms, Session Timeouts & Bathrooms

Results 1 to 4 of 4

Thread: Forms, Session Timeouts & Bathrooms

  1. #1
    Scott McMasters Guest

    Default Forms, Session Timeouts & Bathrooms

    I work with a particularly stupid and pinheaded network administrator who has shortened my session timeout to an insufferable period. This is how I&#039m trying to get around it:<BR><BR>20 minutes at form.html, bathroom break, coffee, submit<BR><BR>session has expired, must logon again<BR><BR>before the redirect, shove all the form info into a session-level dictionary object<BR><BR>check logon, redirect to the original target of form.html<BR><BR>process info in dictionary object, transferred to a local one<BR><BR>The problem is the values in my session-level DO seem to be corrupted and missing when I get back to the original target!!! Anyone else run across this kind of problem?<BR><BR>Also, how can I explicitly get that session-level DO out of system memory at the end of this process? Will setting it to nothing do the trick for sure?<BR><BR>Could you also please drop me a line at so I know your response is here?<BR><BR>Thanks in advance,<BR><BR>Scott L. McMasters<BR>

  2. #2
    Scott McMasters Guest

    Default RE: Forms, Session Timeouts & Bathrooms

    I figured it out myself. In case anyone is interested, I&#039ll put the solution below. I&#039d still like to know how to make sure the session-level variable is being cleared from memory.<BR><BR>Set Session("dicSession") = Nothing (???)<BR><BR>The solution was to pass the values from the request.form to local variables and then into the dictionary object. This is how I&#039m handling it:<BR><BR>&#039looping through the request.form via i:<BR><BR>strKey = Request.Form.Key(i)<BR>strValue = Request.Form.Item(i)<BR><BR>dicLocal.Add strKey, strValue<BR><BR>Next<BR><BR>Set Session("dicSession") = dicLocal<BR><BR>and so on...<BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: Forms, Session Timeouts & Bathrooms

    This is why Session level variables are evil. That and they drag down the performance of your webserver. Just my two cents, though.

  4. #4
    Matthew Reynolds Guest

    Default RE: Forms, Session Timeouts & Bathrooms

    I think that by placing the values into local variables, you&#039re basically implicitly converting from the IString/IStringList objects to VB primitive data types.<BR><BR>You can probably get away with:<BR><BR>session("mytext") = cstr(request("mytext"))<BR><BR>I use this technique on one of my sites and it works fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts