Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 9th, 2007, 02:26 PM
Authorized User
 
Join Date: Oct 2007
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with WroxShop

I am trying to run Wroxshop shopping cart application from chapter 13 of Beginning with ASP.NET 2.0 C#. When I execute and open the URL in two different browser instances than both of them shows item in view shopping cart and addition or deletion of items in one browser instance gets reflected in another instance too. How can i change it so that if i add an item in one browser instance it should not get added in the shopping cart of another browser instance.

Please suggest some idea.

Thanks.

 
Old October 9th, 2007, 04:25 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

If I am not mistaken, the Shopping Cart is based on the Profile feature of ASP.NET 2.0. Profile by default relies on cookies. Cookies are shared between browser windows you open with Ctrl+N or Ctrl+T (in IE at least, that is).

So, you're looking at a lot of default behavior here. Without some extensive rewriting of the application, you won't be able to do this.

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old October 9th, 2007, 09:55 PM
Authorized User
 
Join Date: Oct 2007
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Imar,
         Thanks for your reply. Do you mean to say that this is not possible with Profile and i have to use something like CookieCollection or session. Can you please suggest me the best way of how to implement that without changing a lot in the code. Can i change some settings in web.config or global.asax to achieve that behaviour of temporary shopping cart.

Thanks,
Nilesh

 
Old October 10th, 2007, 01:13 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
quote:Do you mean to say that this is not possible with Profile and i have to use something like CookieCollection or session.
Correct. By default, Profile relies on cookies, and so cookies itself, and session state as well. Moving away from Profile to cookies or session state gives you the same problems.

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending Confirmation email in the WroxShop Tawanda BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 June 7th, 2007 01:56 PM
Where can I download the database WroxShop.mdb? crane8228 Wrox Book Feedback 1 September 17th, 2004 02:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.