G
Guest
I have written a shopping cart using ASP .NET (VB). It has been running
quite successfully on a site for about a year or so. I use the SessionID as
the key to hold information on the shopping cart.
I have copy / pasted the code into a new site. Everything is working,
EXCEPT for the shopping cart holding the SessionID. I have watched the
variable, and each time I hit the 'Update' button in a datalist, the session
ID changes. That is a HUGE problem, and I am about to throw a computer out a
window.
The session ID is supposed to stay the same!!! Where do I look? The sites
are on the same server. IIS 6.0 W2K3 server and updated patches.
I am using a datalist to display the cart that is stored in the database
using the sessionID as the key. The datalist uses LinkButtons (update |
delete) to run code that updates the QTY or deletes the item all together.
Again, this is all of the same code that I have been using on another site
for more than a year, and works fine.
The cart code is all on one page, and posts back to itself. I wrote code
that displays the sessionid on the top of the page, and it changes when I hit
the update or delete buttons. On the site that works, this does not happen.
I have gone back to the site that works, and have checked all of the session
settings that I could find, and the only one I found was in the web.config
file (as expected). I copy / pasted that session state code into the new
site, and the session cookie is still not working correctly.
Code Snippets From Web.Config:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="30"
/>
What else can be wrong? I HOPE it is not a bug with .NET, and it is a
configuration difference of the two sites, even though I have gone through
them with a fine tooth comb. How can it be the code, since it is working on
another site? I am not saying that it isn't my code, but I want to know what
could be wrong with it, if it works elsewhere.
Thanks in advance,
quite successfully on a site for about a year or so. I use the SessionID as
the key to hold information on the shopping cart.
I have copy / pasted the code into a new site. Everything is working,
EXCEPT for the shopping cart holding the SessionID. I have watched the
variable, and each time I hit the 'Update' button in a datalist, the session
ID changes. That is a HUGE problem, and I am about to throw a computer out a
window.
The session ID is supposed to stay the same!!! Where do I look? The sites
are on the same server. IIS 6.0 W2K3 server and updated patches.
I am using a datalist to display the cart that is stored in the database
using the sessionID as the key. The datalist uses LinkButtons (update |
delete) to run code that updates the QTY or deletes the item all together.
Again, this is all of the same code that I have been using on another site
for more than a year, and works fine.
The cart code is all on one page, and posts back to itself. I wrote code
that displays the sessionid on the top of the page, and it changes when I hit
the update or delete buttons. On the site that works, this does not happen.
I have gone back to the site that works, and have checked all of the session
settings that I could find, and the only one I found was in the web.config
file (as expected). I copy / pasted that session state code into the new
site, and the session cookie is still not working correctly.
Code Snippets From Web.Config:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="30"
/>
What else can be wrong? I HOPE it is not a bug with .NET, and it is a
configuration difference of the two sites, even though I have gone through
them with a fine tooth comb. How can it be the code, since it is working on
another site? I am not saying that it isn't my code, but I want to know what
could be wrong with it, if it works elsewhere.
Thanks in advance,