Solved

carry over session to SSL ?

Posted on 2001-07-31
7
205 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 8

Expert Comment

by:drittich
ID: 6338893
Pass them as form variables or querystring variables.
0
 

Expert Comment

by:yonigold
ID: 6340091
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
ID: 6340863
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:blood
ID: 6341094
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
ID: 6342825
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
ID: 6410944
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
ID: 6415903
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
One field not displaying content (ASP Classic) 8 35
CREATE DATABASE 3 34
Pass SQL to JSON. Page is in classic ASP and using Jquery 4 35
Record locking on classic ASP 3 37
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

740 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