Solved

carry over session to SSL ?

Posted on 2001-07-31
7
199 Views
Last Modified: 2013-11-29
I am caching the users shopping cart in session variables (array?).  When I direct the page to an SSL server I get all fields cleared.

I kind of understand why this is happening, because I am initiaing a new connection to a server which is reinitializing all the session variables and I am loosing any saved data.

Is there any way for me to keep that without writing it out to the database and then recalling it ?

-Jay

0
Comment
Question by:blood
7 Comments
 
LVL 8

Expert Comment

by:drittich
Comment Utility
Pass them as form variables or querystring variables.
0
 

Expert Comment

by:yonigold
Comment Utility
can u please add details about the redirection to the ssl server. please write exactly what are you doing.
thanks.
0
 
LVL 6

Expert Comment

by:gete
Comment Utility
Are you trying to connect/redirect the user to different website (other than the originating website/application)? If that's the case than you cannot use the built in Session management provided by ASP, because the Session management is only valid in one application/website.

One of the way you can pass the shopping cart information is like drittich said, use the form or querystring variables which is I think is not quite safe because you're only passing shopping cart information (not credit card info for example).

The other way is to use third party session management, which is able to do multiple website session management, usually using a centralized database server to store the session information.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 2

Author Comment

by:blood
Comment Utility
So I would have to write a routine that dumped the array (row by row) out to stepped variables, and then input those in?

I am currently switching servers.  Here is the scenario:

-www.mysite.com has cart information and customerID.

-After user authenticates with password, their customerID is stored in a session variable and then I redirect them to commerce.myisp.com:440/mywebuserid/checkout.asp

I am currently waiting for thawte to issue my certificate so that I can have secure.mysite.com.   Would that be seen as a redirection?

Gete:  What session management do you speak of?  Is it something on the ASP.DLL level or client side?

Thanks so much !
-Jay
0
 
LVL 6

Accepted Solution

by:
gete earned 100 total points
Comment Utility
Before I answer, I want to correct my previous reply saying that it's NOT safe to pass the variables via form fields/querystring, I must be typing too quickly :) What I actually mean is: I think it IS quite safe to pass the information since it doesn't contain CC number etc.


>> I am currently waiting for thawte to issue my certificate so that I can have secure.mysite.com.   Would
that be seen as a redirection?

Yes, it's still a different ASP Application. That means, the built-in ASP session can't be used accross the sites (ASP applications).


>> Gete:  What session management do you speak of?  Is it something on the ASP.DLL level or client side?

It's still in the server side (of course it still utilize cookie to pass the session ids), usually in the form of component. Here is an article from 15Seconds.com about this kind of product comparison:

http://www.15seconds.com/component/pg000464.htm

Anyway, since you're not using your own server, I think it's quite difficult to install the components into the commerce server. Usually multiple server session management is used to manage session in a webfarm environment or clustered servers. Later on when you have your own commerce server, I'm suggesting you get one of the products shown in that articles to manage the session.

Regards,
.Gt
0
 
LVL 2

Author Comment

by:blood
Comment Utility
Ok, so I am trying to dump my cart to variables... and then pull them back in when I get to the new application.

I cannot figure out how to increment the variables!

Here is my code so far:

<%
const cProductid = 0
const cProductname = 1
const cQuantity = 2
const cUnitPrice = 3
const cShipping = 4

dim arrCart
arrCart = session("mycart")
         
for i = 1 to session("cartitem")
  prodid = arrcart(cProductid,i)
  prodname = arrcart(cproductname,i)
  prodquan = arrcart(cquantity,i)
  prodprice = arrcart(cunitprice,i)
  prodship = arrcart(cshipping,i)
next          

%>

What I want to do, if this makes any sense is:

<%
const cProductid = 0
const cProductname = 1
const cQuantity = 2
const cUnitPrice = 3
const cShipping = 4

dim arrCart
arrCart = session("mycart")
         
dim j
j = 0
for i = 1 to session("cartitem")
  j = j + 1
  prodid(j) = arrcart(cProductid,i)
  prodname(j) = arrcart(cproductname,i)
  prodquan(j) = arrcart(cquantity,i)
  prodprice(j) = arrcart(cunitprice,i)
  prodship(j) = arrcart(cshipping,i)
next          
%>


That way I can dump out the whole cart into the same named variables except the number at the end it stepped up one for each row in the array.

Is this possible ?

Thanks,
Jay
0
 
LVL 2

Author Comment

by:blood
Comment Utility
Alright... well I got it working but I decided to do it using the database.

I created a temporary table, with fields representing the array variables.

In the code, I used a seed to grab a random number, then use that random number to identify the entries in the temp table.  

Then I dumped each array row into the table, and response.redirected to the secure site passing only the random number as the variable.

I then pulled the data out of the table and deleted it after running each entry through the shopping cart add routine.  

Basically I just emptied the cart and re-filled it when I got to the other side.  That way, I didn't have to make a billion code changes on my processing page (which was pulling from the array and session variables).

Thanks for all of your help!   I might need it again if this solution proves to be too much overhead.

-Jay
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now