Shopping cart, session on SSL

A

Adil Akram

I have created a site shopping cart in ASP.net.

I am using ASP session object's SessionID on non SSL connection to track
session.
While adding products to cart DB I insert product and SessionID in table.
All products and cart status pages are on non SSL connection.

On checkout to get secure user information I shifted connection to SSL but
when shifting to SSL, the SessionID changed (As is this is default behavior
of IIS to prevent stealing SSL session).

To get rid of this problem I shifted my all products and cart pages to SSL,
now its working fine but I am not satisfied with this solution because it is
not feasible to put all product pages (about 500 pages) to SSL. As I see
while shopping with big companies sites i.e. Microsoft, Amazon etc. they
change to SSL only in checkout page.

How can I build it like that all pages remains in non SSL and only checkout
pages should be on SSL. One solution may be to use custom cookies to track
session but it may have the same problem of session hijacking/ session
stealing.

Any one please explain me what is the best way to create shopping cart with
SSL, the ASP/ASP.net session or setting own cookies.

Please explain in detail or refer some useful links.

regards,
Adil
 
H

Hans Kesting

Adil said:
I have created a site shopping cart in ASP.net.

I am using ASP session object's SessionID on non SSL connection to
track session.
While adding products to cart DB I insert product and SessionID in
table. All products and cart status pages are on non SSL connection.

On checkout to get secure user information I shifted connection to
SSL but when shifting to SSL, the SessionID changed (As is this is
default behavior of IIS to prevent stealing SSL session).

I don't think it's IIS changing sessions, it's the browser: SSL works over a
different port (443 instead of 80). The browser thinks this is a new site
and will not send the session-cookie of the non-SSL site.
To get rid of this problem I shifted my all products and cart pages
to SSL, now its working fine but I am not satisfied with this
solution because it is not feasible to put all product pages (about
500 pages) to SSL. As I see while shopping with big companies sites
i.e. Microsoft, Amazon etc. they change to SSL only in checkout page.

How can I build it like that all pages remains in non SSL and only
checkout pages should be on SSL. One solution may be to use custom
cookies to track session but it may have the same problem of session
hijacking/ session stealing.

Any one please explain me what is the best way to create shopping
cart with SSL, the ASP/ASP.net session or setting own cookies.

Please explain in detail or refer some useful links.

regards,
Adil

You will need some sort of synchronization between the SSL and non-SSL
parts. One way would be to store the shopping cart in the database
(possibly only "on checkout") under some unique ID. Pass that ID to the SSL
page so you can retrieve the shopping cart there.

Hans Kesting
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top