Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Where is Cookie set

$
0
0
Re: Where is Cookie set
Web Connection 5.0
Re: Where is Cookie set
02/03/2012
12:53:03 AM
3FA01W890 Show this entire thread in new window
Gratar Image based on email address
From:
To:
Attachments:
None
Not sure what you're asking. I previously mentioned that the session Cookie gets set in wwProcess::InitSession().

Nothing has changed in that particular code in the framework in a long time. You might want to make sure you delete the wwSession table however. I think there were some structure changes that might be affecting your session persistance.

+++ Rick ---

I'm not sure what is so difficult to understand. The code I wrote is identical on both machines. I'm just trying to port from one machine to another. I'm not setting special cookies. I'm using your code and it has worked for upwards of eight years now.

Old machine: Sign in. Second screen in the system, in Internet Explorer I look at the Cache- "view cookie information" and it tells me that WCSESSIONSTATE is set to some value corresponding to the ID in the WWSESSION file.
New machine: SAME CODE. Sign in. Second screen. look at the Cache / "view cookie information" and I get zilch.

I knew it was a red herring but there IS a difference between old and new and that is the version of WWC. All I want to know is where is the Cookie attached to the outgoing screen, then I can trace and see what is going wrong. The best I've been able to come up with on my own is in a LENABLESESSIONSTATE_ASSIGN code (in WWSESSION) where "AddCookie" is sometimes called. But I put an ASSERT .F. on every Addcookie function in the code and ran the OLD program in trace mode and Addcookie wasn't called. So I just need some help in figuring out where the cookie gets attached to the outgoing screen so that I can work out how to fix the code on the new machine. Is there maybe a WCONNECT.H setting that I may have overlooked ?

I'm really not sure what you mean when you say in the rendered page. Are you saying the headers are showing up in the HTML?

Web Connection internally only sets one cookie: For the Session object. And this will vary depending on whether it needs setting or not. So if there's a cookie other than the session cookie being set, it's being set in your code and you need to find the spot where it's being set.

+++ Rick ---


Sorry, I should have been clearer. The cookie is certainly set/created. I'm not seeing where it is loaded into the rendered page. In one version of the program the cookie is present and in the other it is missing. And when I trace the rendering process, there is no explicit call to "AddCookie" and yet the cookie shows up in the Internet Explorer page.


What Cookie are you seeing?

The wwSession object creates a cookie and that happens whereever you call InitSession() which is typically in the OnProcessInit() method.
Nothing's changed in the way Cookies are set in a long time so differences in versions might be due to other things.

+++ Rick ---


I have two versions of the same application (I am migrating from Windows2000 to a Windows2008 Server). The only substantive difference between the two is that the live version (W2000) is running WWC 5.31 and the new version (W2008) is running WWC5.60.

What is happening is that the second screen in (after the login) should contain a cookie. The old version DOES have a valid cookie, but the new version doesn't. I have traced the old version line by line and I cannot find any piece of WWC code that sets the cookie. I was looking for a call to "AddCookie", but couldn't find one anywhere. I've checked the pre-HTML generated code, and it is also clean of cookies, and yet when I get to the browser rendered page, there is a cookie present. Can anyone throw any light on where the cookie is added.

Peter Somers



Viewing all articles
Browse latest Browse all 10393

Trending Articles