472,102 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,102 software developers and data experts.

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("strRootDomain")
.Cookies("XXXX")("MemberID") = lngMemberID
.Cookies("XXXX")("MenuSecLevelID") = intMenuSecLevelID

end with
response.write request.cookies("Benesys")("MemberID") & "<br>"
response.write request.cookies("Benesys")("MenuSecLevelID")

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 1786
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("strRootDomain")
.Cookies("XXXX")("MemberID") = lngMemberID
.Cookies("XXXX")("MenuSecLevelID") = intMenuSecLevelID

end with
response.write request.cookies("Benesys")("MemberID") & "<br>"
response.write request.cookies("Benesys")("MenuSecLevelID")

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("strRootDomain") has a value? I've had a
couple of occassions where an Application variable has not been set from
Application_OnStart, 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***@benesysinc.comwrote in message
news:eE**************@TK2MSFTNGP03.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("strRootDomain")
.Cookies("XXXX")("MemberID") = lngMemberID
.Cookies("XXXX")("MenuSecLevelID") = intMenuSecLevelID

end with
response.write request.cookies("Benesys")("MemberID") & "<br>"
response.write request.cookies("Benesys")("MenuSecLevelID")

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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Brian Burgess | last post: by
20 posts views Thread by Brian Burgess | last post: by
1 post views Thread by John Taylor-Johnston | last post: by
6 posts views Thread by Mark | last post: by
6 posts views Thread by Stephane | last post: by
1 post views Thread by Alex Nitulescu | last post: by
reply views Thread by rn5a | last post: by
reply views Thread by leo001 | last post: by

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.