Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session variable persistance, especially with Netscape

Status
Not open for further replies.

kedrew

Programmer
Jun 22, 2001
29
US
I am trying to build an e-commerce application that switches to the HTTPS protocol immediately before payment information is collected. I have stored the OrderID in a session variable, but keep loosing it -- unfortunately not 100%, leaving me to debug a sporadic problem.

To debug, I developed a set of pages - some on the HTTPS/SSL side, others on the HTTP/std side. Using MSIE 6.0, the variables are passed correctly each and every time. Netscape 4.x and 6 do not. They maintain a seperate copy of the session variables for each protocol, and as I jump back and forth, the variables update accordingly - just that they do not share the exact same value.

Two of the files contain the following code:

File 1: (HTTPS) varpass1_2.asp
Code:
Variable #1 is currently '<%= Session(&quot;var1&quot;) %>'
<BR>Add 1 to Variable #1 <% Session(&quot;var1&quot;) = Session(&quot;var1&quot;) + 1 %>
<BR>Variable #1 is now '<%= Session(&quot;var1&quot;) %>'

<P>	Variable #2 is currently '<%= Session(&quot;var2&quot;) %>'
<BR>Add character 'a' to Variable #2 <% Session(&quot;var2&quot;) = Session(&quot;var2&quot;) & &quot;a&quot; %>
<BR>Variable #2 is now '<%= Session(&quot;var2&quot;) %>'

<BR><A HREF=&quot;[URL unfurl="true"]http://....../varpass2_1.asp&quot;>std[/URL] Variable Page (1)</A>

File 2: (HTTP) varpass2_1.asp
Code:
Variable #1 is currently '<%= Session(&quot;var1&quot;) %>'
<BR>Subtract 3 from Variable #1 <% Session(&quot;var1&quot;) = Session(&quot;var1&quot;) - 3  %>
<BR>Variable #1 is now '<%= Session(&quot;var1&quot;) %>'

<P>	Variable #2 is currently '<%= Session(&quot;var2&quot;) %>'
<BR>Remove first character if 2 or more characters exist <% If (Len(Session(&quot;var2&quot;)) > 2) Then Session(&quot;var2&quot;) = mid(Session(&quot;var2&quot;),2) End If %>
<BR>Variable #2 is now '<%= Session(&quot;var2&quot;) %>'

<BR><A HREF=&quot;[URL unfurl="true"]https://...../Secure/test/varpass1_2.asp&quot;>SSL[/URL] Variable Page (2)</A>

By clicking the links, the sequence from IE is:
Code:
var1     var2
5        -,-      (HTTPS)
2        ,-       (HTTP)
3        ,-a      (HTTPS)
0        -a       (HTTP)
1        -aa      (HTTPS)
-2       aa       (HTTP)

By clicking the links, the sequence from NS 4 and 6 is:
Code:
var1     var2
5        -,-        (HTTPS)
-3       <null>     (HTTP)
6        -,-a       (HTTPS)
-6       <null>     (HTTP)
7        -,-aa      (HTTPS)
 
Is the secure side at the same domain? Or it's a shared?
 
Save the value to a cookie, then destroy it when you get to the page.

Or just taking it over with a querystring..

www.vzio.com
ASP WEB DEVELOPMENT



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top