Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 March 27th, 2012, 09:54 AM
Authorized User
 
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
Default Cookie Confusion?

Hi All,

I hope you can help me. I am experienced with VB.NET but new to ASP. I am currently nearing the end of chanter 6 of the beginners guide to ASP but I am struggling with the use of cookies?

In chapter 6 and beyond cookies are use to remember the selected theme for the WROX website. Seems simple to me and the VB code used to achieve this is trivial, even though some of the web classes are new to me.

The problem that I am having though is that no cookies are being created on my local machine to remember the selected theme on the site? To try and see where I went wrong I have ran the source code that came with the book for chapters 6 and 19 and these also do not create the cookies on my local machine to remember the selected theme? I can therefore only assume that my own code is correct and is the same as the WROX source code and that there must be something else going on to stop the cookies from being created?

I have thought about raiding the biscuit barrel but I guess that crumbs on my keyboard will probably not help me too much so can anyone out there shed any light on where I might be doing wrong?

For information, I am using Visual Studio 2010 Ultimate and I have Norton Internet Security installed.

Thanks to anyone and everyone who may be able to guide me in the right direction.

Kind regards,

Ian
 
Old March 27th, 2012, 10:18 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Ian,

Could it be that your browser or security software is blocking the cookies? Have you tried a different browser such as Firefox or Chrome? Also, when you tried my code, did you use the entire site or just copy in some pages? There could be a missmatch in cookie names in the Master Page and the Base Base. if you only copied the former or the latter, the problem may persist....

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
Ian Ryder (March 27th, 2012)
 
Old March 27th, 2012, 10:59 PM
Authorized User
 
Join Date: Mar 2012
Posts: 59
Thanks: 2
Thanked 4 Times in 4 Posts
Default

Hi Imar,

Thanks for your comments and prompt reply. I ultimately ended up on the same track as yourself, believing that it had to be something to do with my browser settings or Norton.

It simply ended up being my browser settings which were set to delete browsing history on exit. This setting included cookies. Once removed, the application works as expected, saving the cookie and therefore remembering the selected theme.

Great idea with the P2P forum to help with questions on the book and development in general.

Thanks once again for your help.

Cheers

Ian
 
Old March 28th, 2012, 02:54 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:
my browser settings which were set to delete browsing history on exit
That explains a lot.... ;-)

Cheers, and thanks for the follow-up.

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Errata confusion morganstein BOOK: Visual Basic 2008 Programmer's Reference ISBN: 978-0-470-18262-8 0 October 10th, 2008 05:11 PM
Confusion with PLATFORM, Help me Please! dpkbahuguna .NET Framework 2.0 10 September 28th, 2007 08:41 AM
foreach confusion stokerfed C# 2 June 13th, 2007 02:30 PM
Class' Confusion dpkbahuguna Beginning VB 6 4 September 20th, 2006 11:16 PM
Stream Confusion benburrows General .NET 1 February 27th, 2004 12:04 PM





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