Reputation: 3558
The code I'm working with has the following lines in the OnSessionStart
function in Application.cfc
:
<cfcookie name="CFID" value="#SESSION.CFID#" />
<cfcookie name="CFTOKEN" value="#SESSION.CFTOKEN#" />
On my LocalHost, these lines trigger an error ("Element CFID is undefined in SESSION") the first time I try to load the app. But then when I refresh, it loads normally.
On the deployed environments (DEV and PROD), it works fine, without an error.
I've looked through the code, and determined that these cookies are never read explicitly by the code, so I commented them out in my LocalHost. This eliminated the error on my LocalHost -- but when I deployed the change to DEV it prevented the LDAP authentication from completing (even though it had completed successfully on LocalHost). Therefore, I had to reverse the change.
Which brings us to the question: How can I eliminate the error in my LocalHost without compromising the login process in DEV and PROD? (Certainly I can live with the error if I must -- but a consistent code base that works identically and reliably in both places is much more desirable.)
I'm very comfortable debugging the code -- but I suspect this issue has something to do with the configuration, and I don't really know where to start beyond the simple experiments I've done above.
Points that may be useful to others with more knowledge and experience than I have:
<cfldap>
.Upvotes: 1
Views: 173
Reputation: 3558
Consider enabling/disabling J2EE session variables in ColdFusion Administrator: Server Settings > Memory Variables > Use J2EE session variables.
(In the situation for which I posed the question, the problem was resolved by disabling J2EE session variables.)
Upvotes: 1