See my last post for the technical explanations.

If I'm guessing correctly, you are running an NT server with IIS? On the
first page of your application you create a file that the user can then
download? With some subsequent page request, you then delete the file?
However, the file still appears to be in the folder tree and a new one with
the same name cannot be written for some period of time.

If this is the case, then it should not make any difference whether or not
the user is "opening" or "saving" the file. What your probably experiencing
is just the coincidental timing of your requests and the cache scavenger. I
would recommend naming the files uniquely and running your own separate
scheduled task that deletes files nightly that are older than so many hours.

If this is not the case, then you really need to give us a better idea of
what OS, Web server, version of ColdFusion, etc. you are running, as well as
the logic behind the application.

Benjamin S. Rogers
Web Developer, c4.net
voice: (508) 240-0051
fax: (508) 240-0057

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 09, 2001 12:43 PM
To: CF-Talk
Subject: RE: CFFILE Delete then WRITE issue....



This is great help and I appreciate all this feedback.

Is there an answer to my second question... I think this is an issue if
someone tries to OPEN the file instead of SAVING it.  So the second
question is is there a way to force someone to DOWNLOAD the file instead of
opening it?

This would also help me.

Vance Duke
Cold Fusion Application Developer
i2 Technologies
(469) 357-4729




                    "Benjamin S.
                    Rogers"              To:     CF-Talk
<[EMAIL PROTECTED]>
                    <[EMAIL PROTECTED]>         cc:
                                         Subject:     RE: CFFILE Delete then
WRITE issue....
                    01/09/01
                    11:24 AM
                    Please
                    respond to
                    cf-talk






Keep in  mind that though this eliminates most problems, the issue will
still persist. The best way to solve the problem is to use the CFLOCK tag.

Benjamin S. Rogers
Web Developer, c4.net
voice: (508) 240-0051
fax: (508) 240-0057

-----Original Message-----
From: Chris Terrebonne [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 09, 2001 12:09 PM
To: CF-Talk
Subject: Re:CFFILE Delete then WRITE issue....


You are encountering file locking errors.  The write is trying to begin
before the delete has released it's lock on the file.  When writing and
deleting, I always rename the file first, then delete the renamed file.
Same for the write.  Write to a temp file, then once the write is complete,
rename that to it's proper name.

Chris
----------------------------------------------
Original Message
From: ""<[EMAIL PROTECTED]>
Subject: CFFILE Delete then WRITE issue....
Date: Tue, 09 Jan 2001 10:53:23 -0600

>
>OK.  I am having a problem here.  I am able to DELETE a file with CFFILE
>without a problem, but when I try to almost immediately WRITE the same
file
>back it tells me there is an issue with the file "Error: The file could
not
>be accessed."  Has anyone encountered this before?  When I check on the
>server for the file, what once was a 500k file, is now only 500 bytes, but
>when I try to open it there it tells me that the "file could not be
found."
>But it exists.  And then I have to wait a while to get the OS to release
>it.  I check it 24 hours later (because I am working on other things too,
>and I so sleep some), and it works fine.  I think this is an issue if
>someone tries to OPEN the file instead of SAVING it.  So the second
>question is is there a way to force someone to DOWNLOAD the file instead
of
>opening it?
>
>Also, when I browse that directory in CF Studio, the file name has a RED
>DOT to the left, and I have never seen this before.
>
>Any help would be MOST appreciated.
>
>Vance Duke
>Cold Fusion Application Developer
>i2 Technologies
>(469) 357-4729
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to