473,394 Members | 1,778 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,394 software developers and data experts.

sessionid question

I have been out of this group for so long, then 2 questions in one day! Let
me give some background on what I am trying to do.....

I have an IIS server running ASP apps. I have a Websphere server being a
servlet container (and a couple of other things) running java servlets and
JSP. We are migrating our online services to JSP etc.. In the meantime, I am
trying to build an artifical session bridge. Imagine this...

A person logs into the Online Services (henceforth OS to reduce typing) in
ASP. For the time being, login will continue to reside within the ASP app
set. They request various services; go look at their loan info, go look at
their grant info, all within the ASP service set. Then they request a
service which is JSP (unbeknownst to them, of course). Off we send them to
JSP land on a different server. We send over a unique identifier of the
person. At the point when they request the JSP service, I will:

-store and pass a unique session identifier in some mechanism which is
available to both JSP and ASP (a domain specific cookie with no expiry, post
back and forth... something)
-store all session name value pairs to a database keyed on the
aforementioned unique session identifier
-pass a unique person identifier

So off they go to JSP, we can know who they are and pull there personal info
from the database in which it is stored. When they come back, I can rebuild
their state from the session name value pairs in the db even if the ASP
session has expired while they were gone.

So my question is, can I use the ASP SessionID for my unique session
identifier? I know that they are reused. But does anyone know how and when
they are reused? The session will be maintained within the database, and
will have a mechanism for cleaning up expired sessions. So I am not trying
to key a real persistant data system on it.

Thanks for the help!

S


Jul 19 '05 #1
3 1823
IIRC the ASP session id "counter" resets when the ASP application re-starts
(change to global.asa, reboot, iisreset, etc). If your ASP application
always controls the session id, and it is not on a web-farm, and you clear
the session table in the database when the application restarts then you
should be ok. I would probably use an id guaranteed to be unique in the
database myself (autonumber column in Access, identity column in SQLServer)

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Stephanie Stowe" <st***@whackthisvsac.org> wrote in message
news:ej**************@TK2MSFTNGP10.phx.gbl...
I have been out of this group for so long, then 2 questions in one day! Let me give some background on what I am trying to do.....

I have an IIS server running ASP apps. I have a Websphere server being a
servlet container (and a couple of other things) running java servlets and
JSP. We are migrating our online services to JSP etc.. In the meantime, I am trying to build an artifical session bridge. Imagine this...

A person logs into the Online Services (henceforth OS to reduce typing) in
ASP. For the time being, login will continue to reside within the ASP app
set. They request various services; go look at their loan info, go look at
their grant info, all within the ASP service set. Then they request a
service which is JSP (unbeknownst to them, of course). Off we send them to
JSP land on a different server. We send over a unique identifier of the
person. At the point when they request the JSP service, I will:

-store and pass a unique session identifier in some mechanism which is
available to both JSP and ASP (a domain specific cookie with no expiry, post back and forth... something)
-store all session name value pairs to a database keyed on the
aforementioned unique session identifier
-pass a unique person identifier

So off they go to JSP, we can know who they are and pull there personal info from the database in which it is stored. When they come back, I can rebuild their state from the session name value pairs in the db even if the ASP
session has expired while they were gone.

So my question is, can I use the ASP SessionID for my unique session
identifier? I know that they are reused. But does anyone know how and when
they are reused? The session will be maintained within the database, and
will have a mechanism for cleaning up expired sessions. So I am not trying
to key a real persistant data system on it.

Thanks for the help!

S

Jul 19 '05 #2
"Stephanie Stowe" <st***@whackthisvsac.org> wrote in message
news:ej**************@TK2MSFTNGP10.phx.gbl...
So my question is, can I use the ASP SessionID for my unique session
identifier? I know that they are reused. But does anyone know how and when
they are reused? The session will be maintained within the database, and
will have a mechanism for cleaning up expired sessions. So I am not trying
to key a real persistant data system on it.


I believe the server will reuse session IDs after a restart, but I'm not
certain of this. Either way, a slightly safer method would be to generate
some unique value and use that. Personally, I do it by creating a string
that is a combination of the the Session.SessionID, the date
(year,month,day,hour,minute,second), and a few random characters. This
should pretty much ensure that you'll never have any duplicates.

Regards,
Peter Foti
Jul 19 '05 #3

"Mark Schupp" <ms*****@ielearning.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
IIRC the ASP session id "counter" resets when the ASP application re-starts (change to global.asa, reboot, iisreset, etc). If your ASP application
always controls the session id, and it is not on a web-farm, and you clear
the session table in the database when the application restarts then you
should be ok. I would probably use an id guaranteed to be unique in the
database myself (autonumber column in Access, identity column in SQLServer)
Me too. But the DB is DB2 on the iSeries. We have been having difficulty
getting the identity BACK after an insert.

Thanks. I'll think on it.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Stephanie Stowe" <st***@whackthisvsac.org> wrote in message
news:ej**************@TK2MSFTNGP10.phx.gbl...
I have been out of this group for so long, then 2 questions in one day! Let
me give some background on what I am trying to do.....

I have an IIS server running ASP apps. I have a Websphere server being a
servlet container (and a couple of other things) running java servlets and JSP. We are migrating our online services to JSP etc.. In the meantime, I am
trying to build an artifical session bridge. Imagine this...

A person logs into the Online Services (henceforth OS to reduce typing)

in ASP. For the time being, login will continue to reside within the ASP app set. They request various services; go look at their loan info, go look at their grant info, all within the ASP service set. Then they request a
service which is JSP (unbeknownst to them, of course). Off we send them to JSP land on a different server. We send over a unique identifier of the
person. At the point when they request the JSP service, I will:

-store and pass a unique session identifier in some mechanism which is
available to both JSP and ASP (a domain specific cookie with no expiry,

post
back and forth... something)
-store all session name value pairs to a database keyed on the
aforementioned unique session identifier
-pass a unique person identifier

So off they go to JSP, we can know who they are and pull there personal

info
from the database in which it is stored. When they come back, I can

rebuild
their state from the session name value pairs in the db even if the ASP
session has expired while they were gone.

So my question is, can I use the ASP SessionID for my unique session
identifier? I know that they are reused. But does anyone know how and when they are reused? The session will be maintained within the database, and
will have a mechanism for cleaning up expired sessions. So I am not trying to key a real persistant data system on it.

Thanks for the help!

S


Jul 19 '05 #4

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

Similar topics

6
by: Patrice Scribe | last post by:
I noticed that the SessionID is now a complex string instead of a simple number as it was under ASP. I believe it could be because when session variables are persisted ot the database, reusing a...
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...
4
by: Andy Fish | last post by:
Hi, I have an asp.net application that is using Forms Authentication and maintaining http session state using cookies in the normal way. when the user clicks the logout button I do this: ...
5
by: Reza Solouki | last post by:
Help, I posted another thread here asking help because I was losing my session information(got no response). After a lot of searching on different sites I discovered that my sessionID changes...
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
6
by: Rob Meade | last post by:
Hi all, I've just put some code together (cobbled is a phrase I like to use) - to handle a secure login to a web based application. It's not exactly rocket science, a session is created, its...
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...
4
by: GaryDean | last post by:
Bringing up a new browser instance when using an asp.net application using forms authentication, of course, initiates a new session with a new sessionID and requires authentication again. But, I...
0
by: patrick.nee.jr | last post by:
I have a question about session state: I have a complex application in which after logging into an ASP.Net 2.0 application using asp membership, a subsequent page passes the SessionID to an...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.