Solved

carry over session to SSL ?

Posted on 2001-07-31
7
204 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
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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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
Server Timeout with Loop 6 52
Recordset containing single quotes 8 43
Cannot open file from ASP if user is "logged in" 13 30
Filktering Alphabetically 8 28
The aim of this article is to help you solve the error "Cannot insert the value NULL into column 'ShortDescription', table 'albert_store.dbo.Nop_Product'; column does not allow nulls. UPDATE fails." problem and allow you to continue updating your No…
Are you using email marketing software? If not, you're missing out on effortless marketing and the reaching of desired conversion rates through email marketing software.
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…

790 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