Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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
  #1 (permalink)  
Old March 6th, 2012, 05:08 AM
Authorized User
Points: 233, Level: 4
Points: 233, Level: 4 Points: 233, Level: 4 Points: 233, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2011
Posts: 44
Thanks: 14
Thanked 0 Times in 0 Posts
Default Chapter 6: theme cookie expires at the end of the session

Hello Imar,

I refer to pages 214-228 of your book (Themes).

I set my Internet Explorer options to accept all the cookies,
I set the Expires property of my theme cookie to a very long time,
I debugged my app and saw the cookie is created, as expected.

Despite all of the above, when I restart my app, after a few seconds, there is no more cookie and the theme is retrieved from web.config.

Why ?
  #2 (permalink)  
Old March 6th, 2012, 05:11 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

Hard to say without seeing your code.

Does it work when you open the full source of the site that comes with the book? (Try opening the code for Chapter 18). If that doesn't work, there may be something blocking cookies on your machine (security software, network policies, etc). Have you tried a different browser?

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!
  #3 (permalink)  
Old March 6th, 2012, 05:38 AM
Authorized User
Points: 233, Level: 4
Points: 233, Level: 4 Points: 233, Level: 4 Points: 233, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2011
Posts: 44
Thanks: 14
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
Have you tried a different browser?

Imar
Than you for your hint.
The code works with Chrome and Firefox. I mean, the theme cookie is saved at the end of the session and when I restart the app, the theme is retrieved from the cookie, not from web. config.
The problem is with Internet Explorer (version 9), despite I set the option to accept all the cookies.

Bye
  #4 (permalink)  
Old March 6th, 2012, 06:02 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

Hmmm, not sure what's going on then. Could be anything ;-) Are you running IE as an Adminstrator? (E.g. starting it from Visual Studio in "Run As Administartor" mode?

Not sure what else to check....

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
session state expires?? chroniclemaster1 ASP.NET 2.0 Professional 4 February 5th, 2010 11:43 AM
Session/Cookie Expires, Login page appears rajn ASP.NET 1.0 and 1.1 Professional 3 June 27th, 2007 06:19 AM
Session expires immediately codebuyer Classic ASP Components 6 March 18th, 2005 12:54 PM
session and cookie problem (empty session file) msincan BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 27th, 2005 05:31 PM





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