A better way to achieve what you want is to password protect certain folders
on your site so that the files cannot be access until a user has logged in.
Using CF to do this only works to secure cfm files, so if you want to secure
PDF's and the likes then simply use .htaccess files instead. This is native
to Apache and can be done on IIS using Helicon APE.
Once the user is authenticated via the .htaccess you can capture the
username to CF for further granular control.

Using only CF and not .htaccess the usual method to secure files is to store
them outside the webroot and use CFCONTENT to deliver them to authenticated
users. This however does have issues as it can easily result it hung native
java requests if the file fails to download for any reason or the user
closes his browser, which means CF needs restarting in order to free up that
hung request. Once you reach your max number of concurrent requests then CF
will stop processing.

HTH

Russ

On Wed, Jun 22, 2011 at 4:10 PM, Andrew Scott <andr...@andyscott.id.au>wrote:

>
> Do you mind me asking what need would require this? I am struggling to even
> think of one.
>
>
> Regards,
> Andrew Scott
> http://www.andyscott.id.au/
>
>
>
>
> > -----Original Message-----
> > From: Claude Schnéegans <schneeg...@internetique.com> [mailto:=?ISO-
> > 8859-1?Q?Claude_Schn=E9egans <schneegans@interneti=71?= =?ISO-8859-
> > 1?Q?ue.com=3E?=]
> > Sent: Thursday, 23 June 2011 12:33 AM
> > To: cf-talk
> > Subject: application.cfm
> >
> >
> > Hi,
> >
> > I've noticed that application.cfm is indeed run before the template
> called
> in
> > the url, but the template itself is compiled BEFORE application.cfm is
> called.
> > I need to have the ability in application.cfm to run some code and NOT
> > compile the template.
> >
> > Is it possible ?
> > CF 9
> >
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:345528
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to