Solved

classic asp cookie not deleting

Posted on 2014-12-15
2
707 Views
Last Modified: 2014-12-15
I am setting a cookie in ASP like this:
 response.Cookies("auctionsession") = randomSessionVar
 Response.Cookies("auctionsession").Expires = Date() + 15
 Response.Cookies("auctionsession").Domain = ".oorahauction.org"

Then when they log out I try to delete the cookie this way
            response.Cookies("auctionsession") = ""
                         Response.Cookies("auctionsession").Expires = Date() -1
but my cookie isn't going away or clearing.
Am I missing something?
0
Comment
Question by:rivkamak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 40501049
try

 Response.Cookies("auctionsession").Domain = ".oorahauction.org"
 Response.Cookies("auctionsession").Expires = Date() -1
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 40501244
Note that 'Response.Cookies' MUST be done before any other non-ASP output.  You can Not set or delete a cookie after any page content has been sent.  It MUST be done before that.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month5 days, 21 hours left to enroll

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question