Forums Home  Search  Register  Login  Member List Recent Posts
»Forums Index »Articles »A ColdFusion weather custom tag »Error when using CF MX 7
Author Topic: Error when using CF MX 7 (3 messages, Page 1 of 1)

cgirtman
--
Posts: 2
Joined: Dec 8, 2005


Posted: Dec 8, 2005 02:44 PM          Msg. 1 of 3
My server is running ColdFusion MX 7. I'm getting the following error.:

Cannot lock application scope.
CFLock cannot be used to lock the application or session shared scopes without these scopes being established through the use of the CFApplication tag. If you want to use the session scope you need to enable session management. Application and/or Session variables must also be enabled in the ColdFusion Administrator.

The error occurred in C:\Inetpub\wwwroot\weather\weather.cfm: line 289

Any help is greatly appreciated!

cgirtman
--
Posts: 2
Joined: Dec 8, 2005


Posted: Dec 8, 2005 02:55 PM          Msg. 2 of 3
I fixed it by adding a file named application.cfm to my weather directory. The application.cfm file had the following text in it:

<CFAPPLICATION NAME="sWeather"
SESSIONMANAGEMENT="Yes" >

Session and Applicaton varibles need to be turned 'on' as well in server administator.

evagoras
--
Posts: 157
Joined: Mar 1, 2005

Forum Administrator


Posted: Dec 9, 2005 01:51 AM          Msg. 3 of 3
Thanks for pointing that out! I usually turn those scopes on for every site that I work on, so I forgot to mention them. I have added the "Application.cfm" file to the downloadable code, and have edited the article to mention your post and the need for these scopes to be made available.

If you want to, please share with us any cool weather controls you create, so we can get some ideas on ways to use this custom tag. It's up to you though - only if you like to.