Ask a Question related to ASP, Design and Development.
-
Joel Brabant #1
session is nothing
How can I know if a user session had timed out ?
I always get an error in my asp page when I try to access
my session variable if it timed out.
Thank You.
Joel Brabant Guest
-
#16263 [Com]: session.start() create new empty session file and not resume existing session
ID: 16263 Comment by: pat at burnttech dot com Reported By: kur at natur dot cuni dot cz Status: No Feedback... -
How can I "know" the difference between a session timed out and a session that did session.abort?
Any clues? Thanks for your time. Adam -
#25307 [Ver->Csd]: Crash when session.serialize_handler=wddx & session, post, get vars
ID: 25307 Updated by: sniper@php.net Reported By: cristea at pntcd dot ro -Status: Verified +Status: ... -
#25307 [Ver]: Crash when session.serialize_handler=wddx & session, post, get vars
ID: 25307 User updated by: cristea at pntcd dot ro Reported By: cristea at pntcd dot ro Status: Verified Bug Type: ... -
#25307 [NEW]: Crash when session.serialize_handler=wddx & session, post, get vars
From: cristea at pntcd dot ro Operating system: any PHP version: 4CVS-2003-08-29 (stable) PHP Bug Type: Session related Bug... -
Ray at #2
Re: session is nothing
What error? What code? Any time you hit your asp page, there's a session,
whether it's the same one that you had five seconds prior, or a new one.
Ray at work
"Joel Brabant" <joel.brabant@tembec.com> wrote in message
news:085701c3940e$57098300$a001280a@phx.gbl...> How can I know if a user session had timed out ?
>
> I always get an error in my asp page when I try to access
> my session variable if it timed out.
>
> Thank You.
Ray at Guest
-
Mike Florio #3
Re: session is nothing
define "try to access" !
"Joel Brabant" <joel.brabant@tembec.com> wrote in message
news:085701c3940e$57098300$a001280a@phx.gbl...> How can I know if a user session had timed out ?
>
> I always get an error in my asp page when I try to access
> my session variable if it timed out.
>
> Thank You.
Mike Florio Guest
-
Joel Brabant #4
Re: session is nothing
The error is : object required....
The session has timed out.
For sure my session("blabla") is nothing... I know that.
But howcome it crashes when I use
If session("blabla") is nothing then
...
end if
!!!
Joel Brabant
Developer
Tembec Inc.
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Joel Brabant Guest
-
Ray at #5
Re: session is nothing
Are you storing OBJECTS in session variables?
Ray at work
"Joel Brabant" <joel.brabant@tembec.com> wrote in message
news:emhrMPBlDHA.2140@TK2MSFTNGP09.phx.gbl...> The error is : object required....
>
> The session has timed out.
> For sure my session("blabla") is nothing... I know that.
>
> But howcome it crashes when I use
>
> If session("blabla") is nothing then
> ..
> end if
>
> !!!
>
> Joel Brabant
> Developer
> Tembec Inc.
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Ray at Guest
-
Mike Florio #6
Re: session is nothing
"is" is not a keyword. Why don't you post the code so that we can really
help you ;->
"Joel Brabant" <joel.brabant@tembec.com> wrote in message
news:emhrMPBlDHA.2140@TK2MSFTNGP09.phx.gbl...> The error is : object required....
>
> The session has timed out.
> For sure my session("blabla") is nothing... I know that.
>
> But howcome it crashes when I use
>
> If session("blabla") is nothing then
> ..
> end if
>
> !!!
>
> Joel Brabant
> Developer
> Tembec Inc.
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Mike Florio Guest
-
Ray at #7
Re: session is nothing
P.S. Is Nothing only works on variables that have been defined as object
variables. i.e.
On Error Resume Next
Dim x
response.write "x is nothing?<br>"
Response.Write x is nothing
response.write "<br>" & err.description
err.clear
response.write "<hr>"
set x = createobject("adodb.connection")
response.write "x is now an object<br>"
response.write x is nothing
response.write err.description & "<br>"
err.clear
response.write "<hr>"
response.write "x has been destroyed<br>"
set x = nothing
response.write x is nothing
response.write err.description
If this were VB code and you did:
dim x as object
It wouldn't generate the error.
Ray at work
''that will gen
"Joel Brabant" <joel.brabant@tembec.com> wrote in message
news:emhrMPBlDHA.2140@TK2MSFTNGP09.phx.gbl...> The error is : object required....
>
> The session has timed out.
> For sure my session("blabla") is nothing... I know that.
>
> But howcome it crashes when I use
>
> If session("blabla") is nothing then
> ..
> end if
>
> !!!
>
> Joel Brabant
> Developer
> Tembec Inc.
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Ray at Guest
-
Bob Barrows #8
Re: session is nothing
Joel Brabant wrote:
Because, unless you are storing an object in session("blabla"),> The error is : object required....
>
> The session has timed out.
> For sure my session("blabla") is nothing... I know that.
>
> But howcome it crashes when I use
>
> If session("blabla") is nothing then
> ..
session("blabla") will not be an object. Only objects can be Nothing.
I usually do this:
If len(session("blabla")) = 0 then
--
HTH,
Bob Barrows - Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows Guest
-
Joel Brabant #9
Re: session is nothing
Session("oAppUser") is in fact an object that was returned by my vb code
like this:
Set oAppTDE = Server.CreateObject("AppTDE.TDEManager")
Set Session("oAppUser")=oAppTDE.Login(cstr(sUsername), cstr(sPassword))
Set oAppTDE = Nothing
Don't worry ! I know, we are not suppose to store objects in session
variables....but that object has just a couple of properties that's it.
Thank you all for your help.
Joel Brabant
Developer
Tembec Inc.
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Joel Brabant Guest
-
Bob Barrows #10
Re: session is nothing
Joel Brabant wrote:What the object stores is not the problem. The problem is whether or not the> Session("oAppUser") is in fact an object that was returned by my vb
> code like this:
>
> Set oAppTDE = Server.CreateObject("AppTDE.TDEManager")
> Set Session("oAppUser")=oAppTDE.Login(cstr(sUsername), cstr(sPassword))
> Set oAppTDE = Nothing
>
> Don't worry ! I know, we are not suppose to store objects in session
> variables....but that object has just a couple of properties that's
> it.
>
object is free-threaded. If it was created in VB, then it is not
free-threaded, and storing it in Session is not recommended.
So, you need to find out if the session variable exists, and if it does
exist, it will contain an object.
The first step is to use IsObject to determine if it is an object.
If IsObject(Session("oAppUser") then
if not Session("oAppUser") is nothing then
--
HTH,
Bob Barrows - Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Bob Barrows Guest



Reply With Quote

