#1
  1. No Profile Picture
    Registered User
    ASP Explorer (0 - 99 posts)

    Join Date
    Dec 2004
    Posts
    6
    Rep Power
    0

    Problems with Session variables


    My problem is about reading session variables. I don't know much about them, but I have one script (script A) which sets some session variables. Then another script is called from script A (script B) which is an instant payment notification script from Paypal, so I dont really have control over it. Script B sends Script C information directly, Script C also needs information from A. I guess Script B sends the info through XMLHTTP as a post. I thought I'd just create a session variable in Script A and then Script C would be able to read it, but it only reads session variables from script A if I actually visit script C. script C handles the information sent from Script B with no problem, but I dont know how to get access to the info from script A. Can anyone help me with this problem? Let me know if I have to explain it better.

    some psuedoCode:
    Script A:
    Code:
     
    If (Form is filled out)
     Dim sendValue
     Session("theValue")= sendValue
     Response.Redirect Script B  
    End If
    Then Script B does some stuff and sends it over to script C
    problem part of Script C:
    Code:
     
    if (information has been sent by script B)
      
      Dim Value
      Value = Session("theValue")
      'insert value into database
    endif
    C wont read the session variable when script B is sending the information, I have to physically go to script C for it to read the sessions value. Any help is appreciated.
  2. #2
  3. No Profile Picture
    Need hosting? I can help.
    ASP Adventurer (500 - 999 posts)

    Join Date
    Sep 2003
    Posts
    826
    Rep Power
    16
    The session variables set in the script A will be available in all other scripts within your ASP web application.
  4. #3
  5. Moderator From Beyond
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2004
    Location
    Israel
    Posts
    31,135
    Rep Power
    2926
    unless the browser has cookies disabled, in which case it won't work at all. but in this particular case he says it do work, if he go directly to the third page. that's what baffld me, and I don't have any idea what can cause this.
  6. #4
  7. No Profile Picture
    Grumpier Old Moderator
    ASP Mastermind (5000+ posts)

    Join Date
    Sep 2003
    Posts
    10,143
    Rep Power
    191
    Are your two asp pages in the same virtual directory and web application? If they are in different virtual directories session data won't follow across the web application boundaries.
    ======
    Doug G
    ======
    I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Similar Threads

  1. Problems with session variables
    By Pluto in forum ASP Development
    Replies: 0
    Last Post: November 10th, 2004, 07:13 AM
  2. Session Variables
    By kparkk in forum ASP Development
    Replies: 5
    Last Post: November 1st, 2004, 11:02 PM
  3. Session Variables
    By awar90 in forum ASP Development
    Replies: 5
    Last Post: September 10th, 2004, 08:51 AM
  4. ASP form to change password
    By Webgirl32 in forum ASP Development
    Replies: 19
    Last Post: August 9th, 2004, 03:13 PM
  5. Using session variables
    By kavel in forum ASP Development
    Replies: 2
    Last Post: November 28th, 2003, 08:18 AM

IMN logo majestic logo threadwatch logo seochat tools logo