Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    ASP




Issue With Cookies Not Getting Deleted Even After Setting A Previous Date In Expires Property


I am using the following to delete the contents of a cookie

Response.Cookies("maincookie").expires = DateAdd("d",-2,now)
Response.redirect "login.asp"

If i try to alert the value of the cookie in the same page, it shows
the old value. As well as when it is alerted from the login.asp it
shows the old value.

The problem is when i try to update the value of the cookie in the
login page, it does not update the new value.

Only if i close the browser and reopen, the new value gets updated and
even if the old value is originally present in the cookie.

I am specifying the domain and path when creating the cookie. the
expires property is set to date + 1 when creating.

What should be done to delete the contents of the cookie? Should i
specify the domain as well as path when changing the expires property?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Display Until The Date Expires
I am creating an access DB that has job listings and displays the DB online.

I am creating tables rows for 'BeginListing' and 'Endlisitng' etc that are stored as a Date

How do I get the asp/vbscript to check the date 'EndListing' of the entry and to stop displaying it when the date is later than today (so it takes them offline when the date is expired)?

My script is like this and loops through each record set displaying the contents: ...

Setting Cookies
I am not able to set cookies with the domain name on a
Windows 2000 server with IIS 5.0. If I use the IP address
it works. I have another machine running IIS and I
configured them together.

Setting Issue (procedure Is Not Running)
Below written code is working fine and i am getting value in "zt_amt_utilised" in my test server where as this is blank on my production server,what setting or component is missing or anything? Code:

ASP Forms And Setting Cookies
I have a simple textbox in a form, and I want to set a cookie in the whole process, plus go to a new ASP page. Here's the code for setting the cookie:

<% Response.Cookies("FirstName")='(contents of text box)' %>

but I don't see where to put it in the input form. Am I able to set a cookie and process the form to go to the second page, all on the first form? Can someone enlighten me?

Cookies Setting At Brinkster
PHP Code:

<%
If (not (session("MM_UserAuthorization") = "")) Then
    Response.cookies ("UserAuthorization")=Session("MM_UserAuthorization")
    Response.Cookies("MM_Username")=Session("MM_Username")
    Response.cookies ("UserAuthorization").Expires= Now
    Response.cookies ("MM_Username").Expires= Now
    strAuthorization = Session("MM_UserAuthorization")
End if
If (Request.Cookies("UserAuthorization")="") Then
Response.redirect ("login.asp")
Response.End
Else
strAuthorization = request.cookies("UserAuthorization")
End If
%>

1st Question:
Why I cannot use the [asp][/asp] for my asp code posting? I need to use the [php][/php/] which lead to display PHP: header?

2nd Question:
My codes displayed above created using the Ultradev, and since I use free member services from brinkster, which does not allow the session authentication, I "convert" the session into cookies. My question is that:

Response.cookies ("UserAuthorization").Expires= Now
Response.cookies ("MM_Username").Expires= Now

What mean ... Expires= Now, and if i want to set the cookies expire based on session (per browser), what are the codes?

Redirect After Setting Cookies
i have this script named check.asp which checks a users login.

it won't redirect to the sucess page when the login is successful, and it's got me stumped why it won't..

here's the script ....

Setting A Form Field Value Using Cookies
I have a form on a page which I need to auto set certain fields from values stored in a Cookie.

<SCRIPT LANGUAGE="vbscript">
RegisterForm.Prefix.value = Request.Cookies("store")("id1")
</SCRIPT>

That is how it is in my file yet it just appears empty but I know there is valid data in the cookie as I printed it on screen using:

<%
Response.Write(Request.Cookies("store")("id1"))
%>

So I figured maybe it was something to do with the script tags so I tried using the <% %> tags instead and I got an error saying something like Microsoft VBScript runtime object required.

Setting Cookies From Inside Function
I have a function that I'm using to loop through some db query results and put them into a table. Inside the function, I have a line to add certain values to a series of cookies (kind of like a cookie array) as such:

response.cookies("sclot" & ZZ) = LotNum
'response.write(request.cookies("sclot" & ZZ))

If I uncomment the second line, I pull my values just fine from inside the function. The problem is, if I use the exact same line to try to pull the values outside of the function, or from another page, it returns nothing. The whole reason I'm putting these values into cookies is so that I can pull this list up on another page, but I don't seem to be able to. Is there some reason that I would not be able to read a cookie that I set inside a function outside of it?

Setting Session Variables In Cookies For Personalized Content
I have these 3 tabs that I want the user to be able to select, a variable to be set, and then each page they visit in the site to read that variable and subsequently display content based on the variable that is set. So, Sheridan tab sees "Sheridan" variable content, Gillette sees "Gillette" variable content, etc.....

Cookies Issue
I have an application that when it loads, it checks for a cookie on the client side. If the cookie exists, it sets a variable on the specific ASP page for certain fields to be populated. Our problem is that some user sessions have data left over in cookies that
are from a previous user session....

Cookies Order Issue
I've created a bit of code to temporarilly store and display product info in a cookie, I then reuse it to create a list of products.

Listed items appear in a random order, and this order is again affected when I add more items.

Just to give you an example, if I add prod_1, then prod_2... ,prod_5, the list created by reading the items in the cookie shows them as prod_5, prod_3, prod_1, prod_2, prod_4.

I'm I going mad or do I just have a variable/constant missing? .....

COOKIES - Expecting String Output Issue
I am trying to create a shopping basket in asp and it works in setting the cookie and when it response.writes it sets the correct productID, however i keep getting the error message for the line "Response.Cookies (CookieName) = CookieString" reffering to the CookieName it says it it is expecting a string input, can anybody help please?

<%
dim CookieString
dim CookieName
CookieString = Request.Form("qty")
CookieName = Request.Form("ID")
'Response.Write Cookiename
Response.Cookies (CookieName) = CookieString
%>
<form name="buy" action="quantity.asp" method="post">
<p>Quantity:</p>
<input name="qty" maxlength="2" size="2" />
<input name="ID" style="visibility:hidden" value="<%=ProductID%>"/>
<input type="submit" name="buy" value="buy" />
</form>

Setting Date Time
I think this is in the wrong group but since I don't read others much
or code in java script I was wondering if anyone could help me with
this small problem, as I code mostly in ASP vbscript.

I have the following piece of Javascript client code that displays the
users clock on the browser and updates it every second.

I was wondering is it possible for me to set the time to the SERVER
time via ASP vbscript. and then update this time every second on the
users browser. Code:

Date Value Issue
I am trying to retrieve a count of booking entries made 30 days ago, below
is the end of the query I am having problems with.

dbo.booking_form.TimeOfBooking = DATEADD(day, -30, GetDate()) GROUP BY
dbo.booking_form.TimeOfBooking")

When I use the = sign the error reads

Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.

for the entry on the page

(rsCash30("CountOfTimeOfBooking"))

But I know the record exists

Date Issue
I have a field in the table which stores date and datatype is datetime name is Dept_Date
for example the values in the field are like this

5/16/2005 9:11:13 AM

now i have my code like this

d="5/16/2005'

Code:

Set rs= Server.CreateObject("adodb.RecordSet")
str ="SELECT * from Dept where Dept_Date='" & d & "'"
rs.Open str, Conn, 2, 2

Date Issue...
Would anyone know how to format the year as the last two numbers? Like this - May 5, 05

UK Date Format Issue
I'm hosting a site on Small Business Server 2003.

The site displays the dates in US format when I connect via the web but
correctly using 127.0.0.1.

I've set the LCID to 2057 for the UK but the proble, persists. Any ideas ?

Date Format Issue
I have a problem when updating a date into a MS Access database on my WEB Server; my local date format is DD/MM/YYYY yet when my ASP script updates to the WEB server database the format is MM/DD/YYYY.
I have set the session variable for Canada "session.lcid=4105"

I have proven the ASP script is obtaining the date from the form in a correct format Response.Write works fine on the Web Server.

Date Toggling Issue
ive an application that datestamps a row of data.when i make changes to the file from an admin gui it toggles the date between the us (mmddyyyy) and uk (ddmmyyyy).anyone know how to stop this?

Interesteing Date Time Issue
I have a simple script that takes a start date, and an end date and counts the number of days between the two. it is not really working well. Here is the code...(please note I have taken this from another page so it will not look complete). Code:

Cookies Expiry Date
I want to create a cookie that remembers the member's log in password and username. But i do not know how to set an expiry for the cookie. I understand that if I set to the one below, when the user closes and reopens the browser, he will still be logged in. But i wish to let the cookie expire once the browser is closed. How can i specify that?

Response.Cookies( theName ).Expires = "July 31, 2008"

Response.Expires &
Can anyone explain the difference between Response.Expires & Session.Timeout

Session Expires
If I open any other website and open my application, Session get expires. If I open my application first and open any other website, then Session in my application is working properly.

Response.Expires
I am using the following 2 lines of script at the begining of every ASP page
on my site.

Response.Expires = -1
Response.ExpiresAbsolute = Now

Should I also use them in the ASP files that I am including using the
<!--#includes file = "file.asp"--> directive ?

Session Expires
I have an asp application which uses IIS 5 . I need to expire my session in 10 minutes .
I use session.expire=10 in my index.html page. when the session is expired in 10 minutes i need to redirect the respons to the login page agein.how can i do this.

Session Expires
i have admin panel and agent panel. when i open admin panel and log in it works fine. but when agent opens agent panel in different pc and login and acts something like open a page or so, both admin panel and agent panel expires session and asks for re-login. What would be possible reason for this?

platform:
OS: windows 2000 server, IIS 6.0
Script : ASP, Javascript
Database: MsSql 2000 Server

Response.Expires = 0
Will using the response.expire object alleviate the need for users to always clear their cache/refresh the browser when coming to a particular page?

Response.Expires=0 Not Working
I use Response.Expires=0 in asp code. This was working fine in production for
some time on a windows 2000 server. In the last month is code is not working
any more the page does not expire it has a expiry time of 10 minutes. Could a
server update cause this code not to work? or do you have any ideas why this
is not working?

Cookie Not Being Deleted.. How Do I?
I have a cookie with a path of "/"

im trieng to delete it before the expired time has comed anyway i am trieng to delete it by setting the cookie to ""


like so: Response.Cookies("name") = "";

but its not working but...i found out that if i dont set the path it is being deleted but i have to set the path because from some reason without it i have issues where the cookie is not found in some pages.

Deleted The Item
I'm doing an e-inventory system using Dreamweaver MX, ASP. The problem is that I want the system deleted the item that user already choose to use, for example in the store they got 12 keyboard. then when user choose to take 2 keyboard, I want the system automatically state the item left in the store was 10.

Restoring Deleted Records
I noticed that a database that was used and afterwards all its tables were manually deleted, is larger (in kb) then a new empty database.

Does the database store deleted records? How can I retrieve deleted records and tables from a database?

Expired/deleted Domains
how i can build a script to list deleted domains ? then obviously i can add more features on from there, ive looked everywhere and all of them seem to be php so i cant see how they do it.

Database Records Have Been Deleted
I have a web application that simply has 2 text boxes with a start and end date. I have a submit button which triggers the delete from an access database. I use vb.net and asp.net with an access database.

I either don't display "record deleted" or always display "record deleted". I tried the textboxchanged, but that doesn't trigger until I hit the submit button. I tried response.redirect, response.write and even tried using a label with the message. Can anyone tell me how to stop the "recode deleted" upon clicking on the textbox or clicking anywhere on the form.

Creating Cookies In Global.asa Session_OnStart But Cannot Read Cookies On Subsequent Pages.
In my Session_OnStart in Global.asa, I am setting some cookies. One
of them, I set as follows:

dim UserID
UserID = Request.ServerVariables("LOGON_USER")
Response.Cookies("User")("ID") = UCASE(UserID)

When I immediately log the cookie value retrieved from
Request.Cookies("User")("ID") into the Windows Event Log, I get the
correct value. However, when I try to retrieve the cookie on the home
page of my application using the same code,

Request.Cookies("User")("ID"), it either cannot find the cookie or
cannot read the value. I am retrieving the cookie before all HTML
headers are written. It is my first statement on the page after
Option Explicit. I have even compared the session IDs. The SessionID
created in the Session_OnStart is the same value as the SessionID on
the home page.

I have read that the Session_OnStart only has access to the
Application, Session and Request objects. It does not explicitly say
that it does not have access to the Response object. Also, I was even
able to use Response.Write's in Global.asa to print out the values
although it looked like it had also stopped the session after I did
so. Cookies are definitely enabled on my machine. I have even tried
setting the session cookie's expiration to be persistent for a few
days to see if it was perhaps expiring before I was able to read it
but this did not work either.

Is there something preventing cookies to be created in Global.asa in
the Session_OnStart sub? Is the Response object not available???
Please let me know if anyone else has had this problem or solution.

Either BOF Or EOF Is True, Or The Current Record Has Been Deleted.
I am struggling with opening a database and reading data from it via SQL. Please tell me what is wrong with this code. I am trying to open up different tables and get information from them and put it on the one page. Code:

Either BOF Or EOF Is True, Or The Current Record Has Been Deleted
ADODB.Field (0x800A0BCD)

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

This is the error I recieve when trying to run my site. I know why. I am passing a non existed URL Parameter. However I would like to recieve a MsgBox that says that such record doesn't exist. Code:

Either BOF Or EOF Is True, Or The Current Record Has Been Deleted
It says I have 8 records but is not displaying them.

Error:
ADODB.Fielderror '800a0bcd'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /deleteevent.asp, line 33 Code:

Either BOF Or EOF Is True, Or The Current Record Has Been Deleted
I have several pages I set up in my web site and I am having trouble with two of them - search and results. The stat_search uses a form which seems to work right and when I test the recordset on the stat_results page and enter a value it returns the right results.

When a value is entered from the stat_search page the results page displays the records with the right value and the Records _ of _ indicates the right number of records but when I use the Next or Last arrows to move to the next record I receive the ADODB.Field error. Code:

Either BOF Or EOF Is True, Or The Current Record Has Been Deleted
Howcome it doesn't work?

ADODB.Fielderror '80020009'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /gemetria/kjvresp3.asp, line 0

It was working before!!! Code:

Either BOF Or EOF Is True, Or The Current Record Has Been Deleted.
This is the error I'm getting:

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/ism5315/readtrends.asp, line 46

What I'm trying to do is select the records from my table that match the sensor and gauge the user selects. I have time fields that are optional, and I'm trying to get the page to work if the user selects no time frame first.

Of course, there can be mutliple records for the gauge and sensors, so I created a loop that should run thru and select them all. But I am getting the above error. But I know I am getting into the loop because I have included a response.write sql to verify I am selecting the correct objects. Code:

Either BOF Or EOF Is True, Or The Current Record Has Been Deleted
Exact error message:

ADODB.Fielderror '80020009'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
/admindemo/profiles_browse.asp, line 0

ASPNET Account Accidentally Deleted
ASPNET profile/account was accidentally deleted on NT/2000 platform. Is there anyway to get it back without reinstalling the whole exchange/IIS services?

Either BOF Or EOF Is True, Or The Current Record Has Been Deleted
Howcome it doesn't work?

ADODB.Field error '80020009'

Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.

/gemetria/kjvresp3.asp, line 0

It was working before!

Enable Permanent Cookies But Disable Session Cookies
Is it possible for a user to enable permanent cookies but disable session cookies.....this seems like a contradition yet this is what I appear to be
reading in online articles?

Creating Cookies File And Stored In Cookies Folder
I m creating a cookies in my application and it work properly but i can't see the cookies where it will sotred i checked the cookies folder but i didn't find that I want to create a cookies file as the other web site create and store where other cookies will stored in Cookies folder or Temprory Internet files folder eg:1. arvind@google.co[1].txt this stored in cookies folder 2. arvind@msn[2].txt ....

SPLIT FROM LDB File Stays On Server. CAN Be Deleted
I just recently moved from a shared account to a private server. On the shared account, everything worked fine, but after transferring every file as it was before, onto the new server, without any changes to code, the ldb files now won't disappear on their own, like they did on the shared hosting account.

I can manually delete them, but am wondering if there is a server setting that needs to be configured in order for it to delete the ldb files upon closing of the database?

Will these ldb files cause problems in performance if not deleted properly?

Asp.net Property In Asp
there is a property in asp.net called autopostback, what i want is to set this property
on plain asp to give a combo the ability to postback the selected option.

Is this possible???? i need to set something like that to a dinamic combo, any ideas????

If it can be done in java or vbscript just please tell me, cause i don�t have a clue if is possible or not.

Adodbconnection - Property Value
I don't understand why but If I use vbscript the following code works
fine:

....connection string.....
dbConn.Open
msgbox dbConn.Property

but the corresponding code in asp:

...connection string.....
dbConn.Open
response.write dbConn.Property

returns the error "Arguments are of the wrong type, are out of
acceptable range, or are in conflict with one another" In both cases
connection to sql server is ok.

Textbox Property
I have a requirement like this.When the textbox gets focus..at this even i want to change the input langauge settings.like arabic.
Currently i have to do it manually by pressing the Alt+Shift key..to toggle between twon langauages


Copyright © 2005-08 www.BigResource.com, All rights reserved