freelanceprogrammers.org Forum Index » Cold Fusion
Session variable vanishing?
Joined: 12 Jul 2005
Posts: 20
Session variable vanishing?
We`ve had this problem for a while, but because it was only a niggle,
ignored it. Only... it`s annoying me. It`s obviously impossible, and
all the rest of the code I`ve inherited is getting clean and tidy,
so....
This app is currently live in CF5, I`m in the process of moving it to
CFMX (and from Oracle to SQL Server). The bug appears in both versions.
We have a session variable, session.auser.userrole. Set at the time the
user logs into the app, referenced all over the place after that.
On one page, sometimes (no, we can`t yet define "sometimes"), we have a
line:
<cfif BitAnd(application.access.administrator, session.aUser.UserRole)>
which instead of doing what it`s meant to, says "error resolving
parameter session.auser.userrole". So we refresh the page, and it
works. As I say, it`s a niggle.
In an attempt to stop this, we added a few more lines at the start of
the page:
<cfif NOT StructKeyExists(SESSION.AUSER, "USERROLE")>
<CFset SESSION.AUSER.USERROLE="">
</cfif>
And it still does it, "sometimes".
Any suggestions on what we should be looking for?
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







