473,856 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP Cookies

I have a page on my website that sets cookie values and the cookies are
subsequently accessed across the rest of the webpages. These cookies are set
in the login page and after the user logs in, the cookie value is accessed
by a subsequent page to refresh my left navigation bar with a few new
options. THis was all working until about 2 weeks ago on my test area
(housed internally) and production area (which is housed at a vendor).

Now it does not. The code itself is simple and straightforward

with response
.Cookies("XXXX" ).Domain = Application("st rRootDomain")
.Cookies("XXXX" )("MemberID") = lngMemberID
.Cookies("XXXX" )("MenuSecLevel ID") = intMenuSecLevel ID

end with
response.write request.cookies ("Benesys")("Me mberID") & "<br>"
response.write request.cookies ("Benesys")("Me nuSecLevelID")

At the above display, I can see the values have been assigned to the
cookies. When I go to the subsequent page to see if I can access the same
cookies and I put a display same as above, the cookie values come back as
blank. I am not clearing any cookies to my knowledge until I logoff. This
test website page was functional until 2 weeks ago. The same code works just
fine on the live website at the outside vendor

Can anyone shed some light please

Thanks in advance

Apr 17 '07 #1
2 1888
Rahul wrote on Tue, 17 Apr 2007 09:46:42 -0400:
I have a page on my website that sets cookie values and the cookies are
subsequently accessed across the rest of the webpages. These cookies are
set in the login page and after the user logs in, the cookie value is
accessed by a subsequent page to refresh my left navigation bar with a few
new options. THis was all working until about 2 weeks ago on my test area
(housed internally) and production area (which is housed at a vendor).

Now it does not. The code itself is simple and straightforward

with response
.Cookies("XXXX" ).Domain = Application("st rRootDomain")
.Cookies("XXXX" )("MemberID") = lngMemberID
.Cookies("XXXX" )("MenuSecLevel ID") = intMenuSecLevel ID

end with
response.write request.cookies ("Benesys")("Me mberID") & "<br>"
response.write request.cookies ("Benesys")("Me nuSecLevelID")

At the above display, I can see the values have been assigned to the
cookies. When I go to the subsequent page to see if I can access the same
cookies and I put a display same as above, the cookie values come back as
blank. I am not clearing any cookies to my knowledge until I logoff. This
test website page was functional until 2 weeks ago. The same code works
just fine on the live website at the outside vendor

Can anyone shed some light please

Thanks in advance
Did you check that Application("st rRootDomain") has a value? I've had a
couple of occassions where an Application variable has not been set from
Application_OnS tart, so I ended up putting a check for the variable into
Session_OnStart and firing the initialisation code if it was missing, which
pretty much ensures it gets set.

Also, I'm assuming that the XXXX in your response are your attempt to blank
out Benesys (which is what you used in the request code), if not then you're
comparing different cookies.

Dan
Apr 17 '07 #2

"Rahul Chatterjee" <ra***@benesysi nc.comwrote in message
news:eE******** ******@TK2MSFTN GP03.phx.gbl...
I have a page on my website that sets cookie values and the cookies are
subsequently accessed across the rest of the webpages. These cookies are
set
in the login page and after the user logs in, the cookie value is accessed
by a subsequent page to refresh my left navigation bar with a few new
options. THis was all working until about 2 weeks ago on my test area
(housed internally) and production area (which is housed at a vendor).

Now it does not. The code itself is simple and straightforward

with response
.Cookies("XXXX" ).Domain = Application("st rRootDomain")
.Cookies("XXXX" )("MemberID") = lngMemberID
.Cookies("XXXX" )("MenuSecLevel ID") = intMenuSecLevel ID

end with
response.write request.cookies ("Benesys")("Me mberID") & "<br>"
response.write request.cookies ("Benesys")("Me nuSecLevelID")

At the above display, I can see the values have been assigned to the
cookies. When I go to the subsequent page to see if I can access the same
cookies and I put a display same as above, the cookie values come back as
blank. I am not clearing any cookies to my knowledge until I logoff. This
test website page was functional until 2 weeks ago. The same code works
just
fine on the live website at the outside vendor

Can anyone shed some light please

Thanks in advance
Why are you setting the Domain property?
Apr 17 '07 #3

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

Similar topics

4
3890
by: Brian Burgess | last post by:
Hi all, Anyone know of any special issues with storing cookies with ASP? I'm trying this with two browsers: One is IE 6.0 with cookies set to 'prompt'. This has been working properly as any new site I goto seems to prompt me to store their cookie. The other is Pocket IE on Pocket PC 2002, with the cookies set to 'enabled'. My problem is that the cookies dont seem to be being written with my ASP. I dont get the prompt to store...
20
3569
by: Brian Burgess | last post by:
Hi all, Anyone know if this is possible? If so, on which page would the cookie be? .. On the page calling a function defined in the include file? thanks in advance.. -BB
9
2543
by: | last post by:
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?
1
3186
by: John Taylor-Johnston | last post by:
I'm a University academic looking for a proper definition of JavaScript Cookies. http://www.CollegeSherbrooke.qc.ca/languesmodernes/604-HAE_Grammar_Practice/ I'm trying to decipher what categor(ies) JavaScript cookies fall under, according to Internet Explorer's help.cfm. What I don't understand is where do JavaScript cookies fall under the help.cfm definition. Maybe I'm not reading "their" English properly? (See below.) "Persistent -...
6
3064
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a cookie (say Response.Cookies ("TEST")) and you have a query string variable &test=x or &Test=x and you get Request.QueryString to parse the query string, the cookie that gets dropped matches the case of the query string, not what your code says. ...
8
2347
by: CDARS | last post by:
Hi all, I have a confusing question on ASP.NET cookies usage: 1> Response.Cookies("test").value = Now 2> Response.Write(Request.Cookies("test").value) 3> 4> Response.write("<hr>") 5> 6> Response.Cookies("test").value = Now.AddDays(10)
6
8856
by: Stephane | last post by:
Hi, I have a login page where if the user wants his access codes to be saved are set into a cookie. In the logout page, I want to delete those cookies. I tried this and this is not working at all: if (Request.Cookies != null && Request.Cookies != null) { Response.Cookies.Value = null;
1
11459
by: Alex Nitulescu | last post by:
I have the following very simple colde (while learning about cookies and session state): Private Sub cmdAddCookie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAddCookie.Click Dim strCookieName As String Dim objRandom As New Random() strCookieName = "MyCookie" & objRandom.Next(Integer.MaxValue).ToString
0
1714
by: Claudio | last post by:
I have a demo app where cookies does not work. The first page create a cookies. The second read the contet. If I browse the pages via IE6.0 the pages does not work. If I browse the pages via FireFox the pages work fine. ************ SetCookies.asp <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
0
1609
by: rn5a | last post by:
This is how I am creating & then reading cookies: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs) 'create cookies Response.Cookies("UserName").Value = "Ron" Response.Cookies("UserName").Expires = "12/31/2008" Response.Cookies("UserDetails")("FirstName") = "Ronnie" Response.Cookies("UserDetails")("LastName") = "Nathan"
0
9911
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
9762
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
11055
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
10696
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
10780
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
10383
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
7932
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...
0
5761
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4575
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.