November 8th, 2006, 05:52 AM
When I release session objects I do this
So whats the difference when I do this
Isn't I already release it with a null value?
November 8th, 2006, 07:17 AM
There is a slight different between destroying a session and making it equal to nothing.
If it is equal to nothing then it does exist and use String or Len functions to compare/validate it.
Logically, if you destroy the session then is doesnot exist and you should be able to use IsNull or IsEmpty to compare/validate.
ASP VBScript is pretty lenient on some validation though.
November 8th, 2006, 05:27 PM
If you want to "destroy" all of your session variables you can also use:
Hope this helps
November 14th, 2006, 09:29 PM
I try to Stop IIS and when I Start it again sessions and application values are still there
How do you clear all this objects in IIS? can I clear it in using IIS?
November 15th, 2006, 12:37 AM
hmm it sounds impossible dude when you restart IIS Then all user define variable will be released except cookies. it make a sense because those all variables exist under the IIS service.
if you using session("sesname") = "" mean
you assign the session to have empty string value but the session variable still exist in the service.
both set session("sesname")=nothing or session.remove("sesname") are quite same.
session.abandon mean you destroy all session variables in your current service
the best way to find out if the variables is exist or not by using isEmpty not isNull
try these code:
' I never declare the session("1") but isNull will return false
November 15th, 2006, 01:55 AM
Oh I thought IIS can clear those objects, I guess not. Thanks!
November 15th, 2006, 02:05 AM
i mean when you stop the web service all the user define variables will be lost except cookies so i think it is impossible when u restart the IIS the the session still remain or maybe cache problem
January 25th, 2007, 10:07 AM
When I now use the clear session with a value set to nothing, I receive this error
January 25th, 2007, 10:12 AM
It's my understanding that you have to use "Set" when doing that, like "Set session("id") = Nothing". Give that a shot.
January 25th, 2007, 10:55 AM
I have Set it and when I redirect it to another page I receive this error
because there is no line number to know where the error is, I think this is where it cause it
what went wrong?
<%if isempty(session("islogin")) then%>
January 25th, 2007, 11:13 AM
After setting to nothing in LOGOUT.asp from the above code how come I couldn't use this condition?
<%if isempty(session("islogin")) then
response.write "is empty"
response.write "empty" <--won't show :(
February 14th, 2007, 07:46 AM
Have you tried:
Session("id") = Empty