473,382 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

SessionId Property exists or not

Dear All;
I want to ask about how could I know if a specific sessionid still
exists or not. If there is a method or anything that can tell me about
the existence of a specific sessionid .
Thank You
Soha El-Saeed
Jul 19 '05 #1
5 1911
What is your goal here? Just knowing a session number will not do anything
unless you're tying the session to some other specific piece of information
you're after, in which case, you can use SEssion_OnEnd to do what you're
looking to do with that data, I'd imagine.

--

Ray at home
Microsoft ASP MVP
"Soha El-Saeed" <se*******@gawab.com> wrote in message
news:69**************************@posting.google.c om...
Dear All;
I want to ask about how could I know if a specific sessionid still
exists or not. If there is a method or anything that can tell me about
the existence of a specific sessionid .
Thank You
Soha El-Saeed

Jul 19 '05 #2
I want to know that a sessionid exists or not because I have created
(on the server) for each user a txt file which has the sessionid as
its name. After the session is ended I have to delete the file , but
of course I can't use the session_onend event because I can't use
server.mappath. That's why I need to know if a sessionid exists or not
so I can delete the corresponding file.
Thank You for your reply.
Soha El-Saeed
Jul 19 '05 #3
How about storing the path info in a session variable?

--

Ray at home
Microsoft ASP MVP
"Soha El-Saeed" <se*******@gawab.com> wrote in message
news:69**************************@posting.google.c om...
I want to know that a sessionid exists or not because I have created
(on the server) for each user a txt file which has the sessionid as
its name. After the session is ended I have to delete the file , but
of course I can't use the session_onend event because I can't use
server.mappath. That's why I need to know if a sessionid exists or not
so I can delete the corresponding file.
Thank You for your reply.
Soha El-Saeed

Jul 19 '05 #4
I can't use any session variables , properties or methods in the
session_onend event. So the only way is to know if a sessionid still
exists or not to delete the file without using the session_onend
event.
Thank You
Soha El-Saeed
"Ray at <%=sLocation%> [MVP]" <myFirstNameATlane34dotKOMM> wrote in message news:<OS**************@TK2MSFTNGP12.phx.gbl>...
How about storing the path info in a session variable?

--

Ray at home
Microsoft ASP MVP
"Soha El-Saeed" <se*******@gawab.com> wrote in message
news:69**************************@posting.google.c om...
I want to know that a sessionid exists or not because I have created
(on the server) for each user a txt file which has the sessionid as
its name. After the session is ended I have to delete the file , but
of course I can't use the session_onend event because I can't use
server.mappath. That's why I need to know if a sessionid exists or not
so I can delete the corresponding file.
Thank You for your reply.
Soha El-Saeed

Jul 19 '05 #5
Why not?

<script language=vbscript runat=server>
sub session_onStart()
Session("filePath") = Server.MapPath("/") & "\" & Session.SessionID &
".txt"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.CreateTextFile(Session("filePath"), True)
oFile.Write "hey"
oFile.Close : Set oFile = Nothing
Set oFSO = Nothing
End Sub

Sub Session_onEnd()
Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.DeleteFile Session("filePath")
Set oFSO = Nothing
End Sub
</script>
I don't know that I personally would want to do this, but this should work,
in theory.

Ray at work

"Soha El-Saeed" <se*******@gawab.com> wrote in message
news:69**************************@posting.google.c om...
I can't use any session variables , properties or methods in the
session_onend event. So the only way is to know if a sessionid still
exists or not to delete the file without using the session_onend
event.
Thank You
Soha El-Saeed
"Ray at <%=sLocation%> [MVP]" <myFirstNameATlane34dotKOMM> wrote in

message news:<OS**************@TK2MSFTNGP12.phx.gbl>...
How about storing the path info in a session variable?

--

Ray at home
Microsoft ASP MVP
"Soha El-Saeed" <se*******@gawab.com> wrote in message
news:69**************************@posting.google.c om...
I want to know that a sessionid exists or not because I have created
(on the server) for each user a txt file which has the sessionid as
its name. After the session is ended I have to delete the file , but
of course I can't use the session_onend event because I can't use
server.mappath. That's why I need to know if a sessionid exists or not
so I can delete the corresponding file.
Thank You for your reply.
Soha El-Saeed

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Berrucho | last post by:
Please Help! I recently posted this same issue but got no answer... please help Using VB.NET, IIS5, W2K Adv SP3 all patches, .net 1.0, VS.NET 2002 Using forms authentication, persistent cookie...
0
by: Hrvoje Vrbanc | last post by:
Hello all, how could I programatically reset the SessionID property of a session? Session.Abandon leaves the current SessionID value and I need new value set on a clik on the button. Thank...
4
by: Kenny | last post by:
Hi, I have created an ASPX Dim ss As HttpSessionState ss = HttpContext.Current.Session HttpContext.Current.Session("tesAt") = "testValue" Response.Write(ss.SessionID() & "|<br>")...
2
by: Hardin | last post by:
I have an app that uses the sessionID to track user navigation and usage through the application. It works fine except in one case: There is a point in the application where I want to "close"...
2
by: XML newbie: Urgent pls help! | last post by:
If I get SessionID in 1 function how do I carry that SessionID(value of this SessionID) to another function or another form within the same project
11
by: rayala | last post by:
Hi all, I am having very weird problem in my Outlook I am running my web application from with in Outlook.I found a strange problem that it is creating different sessionId if i open a new...
10
by: rlueneberg | last post by:
I am trying to foward the old sessionID using "Session.SessionID" to an HttpWebRequest CookieContainer so that I can capture the requested page session variables but it is not working as it is...
2
by: Chip | last post by:
Maybe this problem has been solved many times. My users frequently bookmark the URL with sessionID in it and then have all kinds of problems when subsequent users use that bookmark since the old...
2
by: KMG | last post by:
How do I get a sessionid? I have tried: Dim mySession as HTTPSessionState Dim sSessionID as String mySessionID = nothing sSessionID = nothing sSessionID = mySessionID.SessionID and I get the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.