Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old April 17th, 2007, 02:55 PM
Rahul Chatterjee
Guest
 
Posts: n/a
Default 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



  #2  
Old April 17th, 2007, 04:15 PM
Daniel Crichton
Guest
 
Posts: n/a
Default Re: ASP Cookies

Rahul wrote on Tue, 17 Apr 2007 09:46:42 -0400:
Quote:
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


  #3  
Old April 17th, 2007, 04:55 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: ASP Cookies


"Rahul Chatterjee" <rahul@benesysinc.comwrote in message
news:eEUPWbPgHHA.1216@TK2MSFTNGP03.phx.gbl...
Quote:
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
Quote:
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
Quote:
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?


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles