Re: Cannot overwrite file using IIS FTP v6.0?
- From: "Pheasant PluckerŪ" <pheasant@xxxxxxxxxxx>
- Date: Wed, 3 Sep 2008 22:28:59 +0100
Thanks for the reply Alun,
Not sure what/how the application uses to upload the file all I do know is
it uploads a screenshot from itself once every 60 seconds.
The very first file is called RadarBoxScreenShot.gif and the idea is it gets
overwritten once every 60 seconds to keep an updated screenshot in position.
Every subsequent file after that is named after the date/time it was
captured/uploaded;
_200808311954.tmp
_200808311955.tmp
_200808311956.tmp
etc.
The .tmp file is actually the .gif screenshot because if I rename the file
extension to .gif it displays in any image viewer.
I never checked the logs at the server but did see the following output in
the applications /DEBUG mode with the output captured by DBWin32;
12:58:22: + Timer_AutoFTPTimer
12:58:24: Timer_AutoFTPTimer - error: RadarBoxScreenShot.gif: Cannot create
a file when that file already exists.
Not much help I guess but all moot now as I have removed the FTP Service
from IIS and installed Serv-U which handles the uploads as it should and is
much better for me to use.
I don't feel so upset now that it's working! ;^)
Kind regards,
-=pp=-
"Alun Jones" <alun@xxxxxxxxxxxxx> wrote in message
news:eM6LKTdDJHA.5060@xxxxxxxxxxxxxxxxxxxxxxx
"Pheasant Plucker®" <pheasant@xxxxxxxxxxx> wrote in message
news:#A4IdLWDJHA.340@xxxxxxxxxxxxxxxxxxxxxxx
I have an application that is able to upload a .gif image file with the
same name into a folder every minute.
I have setup the FTP Service from IIS6.0 under Server 2003
The application finds the folder with no problem & uploads the file.
However it will not overwrite the 'gif file preferring instead to name
the file by date and with a .tmp file extension which increases by 60
every hour!
That sounds like the FTP server is creating a unique file name each time
the upload is attempted.
A compliant FTP server will do that in only one case - and that's when the
client application is using the "STOU" (STOre Unique) command. You can
verify this by checking the log to see which commands are being received
at the server, and/or by monitoring the network traffic using Network
Monitor.
If your application used the "STOR" command, you would find that IIS would
fail to write the file if it could not overwrite it. In fact you can
verify this from most FTP clients. Uploading, then re-uploading, a file
will result in it being overwritten with new contents. Most FTP clients
(other than the command-line FTP client in Windows) also allow you to
specify that uploads should be uniquely named, so that the STOU command is
used, in which case you can replicate this behaviour.
If I rename the .tmp to .gif then it displays as one would expect a .gif
file to display so it is not a .tmp file in the best sense of the word...
What _are_ the normal contents of a ".tmp file in the best sense of the
word"?
I am guessing the application uses what would be the standard 'Put'
command...
Watch where you swing those assumptions!
If it doesn't allow an overwrite is there a work-round? For example a
command line switch or alternative to the 'Put' command that will force
an overwrite?
Am I even correct about the inability of the FTP Service from IIS 6.0 to
allow an overwrite of an existing file with another file that has the
same name and if so is there a document from Microsoft that documents
this behaviour?
No - overwriting files is a normal behaviour for most FTP servers.
Renaming an uploaded file is a rare, but well-described feature of the FTP
protocol when using the STOU command to initiate the upload. When faced
with the choice between two possibilities - that a normal behaviour has
been broken, or that a rare but documented activity is occurring, I
generally start with checking if the documented activity is what's
happening.
STOU is used so rarely that I don't think you should feel upset about not
knowing about it.
Alun.
~~~~
--
Texas Imperial Software | Web: http://www.wftpd.com/
23921 57th Ave SE | Blog: http://msmvps.com/alunj/
Woodinville WA 98072-8661 | WFTPD, WFTPD Pro are Windows FTP servers.
Fax/Voice +1(425)807-1787 | Try our NEW client software, WFTPD Explorer.
.
- References:
- Cannot overwrite file using IIS FTP v6.0?
- From: Pheasant PluckerŪ
- Cannot overwrite file using IIS FTP v6.0?
- Prev by Date: Re: Cannot overwrite file using IIS FTP v6.0?
- Next by Date: IIS 6 FTP Timeouts?
- Previous by thread: Re: Cannot overwrite file using IIS FTP v6.0?
- Next by thread: IIS 6 FTP Timeouts?
- Index(es):
Relevant Pages
|