Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 9th, 2007, 02:26 PM
Authorized User
 
Join Date: Oct 2007
Location: , , .
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.

  #2 (permalink)  
Old October 9th, 2007, 04:25 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
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
  #3 (permalink)  
Old October 9th, 2007, 09:55 PM
Authorized User
 
Join Date: Oct 2007
Location: , , .
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

  #4 (permalink)  
Old October 10th, 2007, 01:13 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 07:00 AM.


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