Com and Session Variables Problem

Results 1 to 2 of 2

Thread: Com and Session Variables Problem

  1. #1
    Join Date
    Dec 1969

    Default Com and Session Variables Problem

    Hi all, i am new to COM so i know everyone will be disturbed at the way i am using it on my asp page. First, I am having problems with the my sessions timing out to early, so i decided to do 'response.expires = 30'. This is when my session variable that holds my com object started to act up. After i instantiate my object, i store it in a session variable (which i have heard is not good, but don't know any other way) and now, whenever a form is submitted i get an error saying 'object needed' but if i reinstantiate the object before it is access it works and that is how i know the session is screwing up. I need the same object throughout so i cannot keep instantiating the object. I had to erase the 'Response.expires' line and restart my computer before i could get it to go back to normal, but i would really like to set an expiration for the session because the default, which is like 2 or 3 minutes is too short, any suggestions.

  2. #2
    Join Date
    Dec 1969

    Default RE: Com and Session Variables Problem

    Well, where to start....<BR><BR>Firstly, *do not* store your COM objects in the session, there is *always* a workaround which is more efficient. I suggest you either go to Microsoft or Google (or similar) and do a search on &#039;maintaining state with ASP&#039;. There should be loads of solutions for your situation, if not then post your problem to see if anyone here can come up with a solution.<BR><BR>Secondly, response.expires merely sets the page to expire in 30 minutes, the property you need to set is Session.Timeout = 30.<BR><BR>Good luck!<BR><BR>--<BR>Anglo Saxon

Posting Permissions

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