You will need to pass your session variables as a parameter in order to use them in the CFC, this is best practices anyways.
Good news, however, is that you can send them as a complete struct, you don't necessarily need to have them send all separately. <cfargument name="sSession" type="struct" required="yes" /> Hope this helps, William ---------------------------------- William Seiter -----Original Message----- From: John Pullam [mailto:jpul...@mcleansystems.com] Sent: Wednesday, January 28, 2015 8:08 AM To: cf-talk Subject: Cannot access session variables in a cfc My app is running in a CF10 system and since I moved my cfc's out of the document root, they are losing access to the session variables. It seems that they work for around a day and then can no longer be found. I initialize them in my application.cfm to a value and I can still cfdump them in a regular web page, but the cfc fails with the error "Element XXX is undefined in SESSION". Is this normal behaviour? If it is, then what is the alternative method of passing a variable into the cfc (other than making it a parameter when calling)? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360022 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm