473,786 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't clear cookie when using .domain property.

Good Day Folks

I'm using the following code when creating, reading, and removing a cookies.

<%
' writing cookie
Response.cookie s("OracleLogin" )("p_userid")=" fcs_system"
Response.cookie s("OracleLogin" )("p_password") ="developfcs "
'Response.cooki es("OracleLogin ").domain="ocds b.ca"
%>
<%
' reading cookie
dim p_userid,p_pass word as string

p_userid=Reques t.Cookies("Orac leLogin")("p_us erid")
p_password=Requ est.Cookies("Or acleLogin")("p_ password")
response.write( "p_userid=" & p_userid & "<br />")
response.write( "p_password =" & p_password & "<br />")
%>
<%
' removing cookie
Response.cookie s("OracleLogin" )("p_userid")=" "
Response.cookie s("OracleLogin" )("p_password") =""
Response.Cookie s("OracleLogin" ).Expires = DateTime.Now.Ad dMonths(-2)
%>

Everything works great until I uncomment the
Response.cookie s("OracleLogin" ).domain="ocdsb .ca"
line in the first block. With this line included the removing cookie code
block has no effect. The cookie persists when it should not. The only way
around this is to close browser.

Any ideas ?

--
Thanks in advance
/Serge
Nov 9 '05 #1
0 1473

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1734
by: Ziggy | last post by:
The purpose of my application is to require a website visitor to complete a form before participating in a search application. I have a specific reason for doing this with client-side javascript, but I'm not going to go into the explanation of "why." Ideally, the visitor goes to http://www.hopelandinc.com/golf-homes.html. If they haven't registered in 90 days, they'll be redirected to a registration form. Once they complete the reg form,...
3
3599
by: rss | last post by:
SUMMARY: ========== I am unable to pass along a simple Cookie obtained from a HttpWebRequest call (Machine A's ASP.NET app) so that another Web Server (Machine B) recongnizes the cookie. I have performed the exact steps by entering the URLs into the browser (IE). In this case, everything works. I have used TcpTrace to monitor the traffic, and have verified that the
3
11124
by: Wysiwyg | last post by:
After a server created cookie is processed on the client I want it removed, cleared, or expired in the javascript block but have been unable to do this. If I set a cookie value in the server code behind and don't use a domain then I can not change or remove that cookie's value on the client. If I subsequently create the cookie again in the codebehind then I actually end up with TWO cookies with the same name in the response. The cookie...
0
333
by: Serge | last post by:
Good Day Folks I'm using the following code when creating, reading, and removing a cookies. <% ' writing cookie Response.cookies("OracleLogin")("p_userid")="fcs_system" Response.cookies("OracleLogin")("p_password")="developfcs" 'Response.cookies("OracleLogin").domain="ocdsb.ca" %>
9
2066
by: ad | last post by:
I use the codes below to clear the cookie: HttpCookie myCookie = new HttpCookie("us_id"); myCookie.Expires = DateTime.Now.AddDays(-1d); Response.Cookies.Add(myCookie); It do well when the cookie is from the web application itself, But fail to clear when the cookie is form another application, like php. How can I do?
17
4182
by: Bruno | last post by:
I have a feature that is hosted on a different domain from the primary one in a frame, and need to retain values in a cookie. example: A web page at one.com contains a frame which has a page hosted at two.com If I view the frameset from one.com in Firefox, all works well with the content from two.com. But if trying to view this using IE (with standard security settings), the cookie set by two.com is not accessible.
24
2478
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How can I see in javascript if a web browser accepts cookies? ----------------------------------------------------------------------- Writing a cookie, reading it back and checking if it's the same. http://www.w3schools.com/js/js_cookies.asp Additional Notes:
5
5918
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, Is there an easier way to handle that? I used Javascript to handle this when our two domains are hosted on two different servers(on different networks) and our search engine marketing people don't like the javascript links since they think the links are not favorable to a search robot. Now our company is thinking about hosting these two domians on the same server, So I am wodering if there is any easy way to do that. Would you...
1
4961
by: domnicx | last post by:
Hi, I am using the httpweblistener class to build a web server kinda functionality. I have to send multiple set-cookie headers in a single response when queried for a particular request and i havent been able to find a way to do that. I tried the cookie class and httpweblistenerresponse.addcookie() method but it still sends only a single set-cookie header. I would like to send somethin like this: Set-Cookie: AB=; domain=.example.com;...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9491
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10104
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.