Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFFILE error message

Status
Not open for further replies.

emms

Programmer
Jan 11, 2001
55
GB
when trying to write a file using the following code the error message - "There was a sharing violation" appears. The file is already there but even so this shouldn't be causing the message.

code:
<cffile ACTION=&quot;Write&quot;
&quot;d:\inetpub\OUTPUT=&quot;#cfhttp.FileContent#&quot;
nameconflict=&quot;OVERWRITE&quot;
addnewline=&quot;Yes&quot;>

thanks for any help you can give

Emma
 
I have noticed that on NT with IIS, the browser can somehow maintain a connection to the server and keep a file locked. I believe this is due to the browser utilizing a connection &quot;keep-alive&quot;. If someone is viewing the file in a web browser, it's possible their browser is keeping the file locked. I've never spent any time investigating it but have found that closing out Netscape on a number of occasions would instantly cause a file or directory to become changeable when previous attempts to delete or rename would give an error.

Also, as CF is multi-threaded, on a busy server it's conceivable that two instances of your script are trying to write the file at the same time.

Hope this helps,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top