Can't delete files unless IIS is stopped.

Posted on 1999-06-29
Medium Priority
Last Modified: 2013-12-25
I have a cgi that generates some gif files for using on the HTML page.  I don't know why sometimes I couldn't delete these gif files.  NT pop-up a message says: "Can't not delete xxxxx.gif", there has been a sharing violation. The source or destination file may be in use."  

When this happens, the only way I can delete these gif files
is to stop the IIS.  So I guess IIS somehow keeps these files opened.  Can someone please tell me why the IIS is doing that?  Thanks a lot.

Question by:themisc
1 Comment
LVL 11

Accepted Solution

mouatts earned 400 total points
ID: 1834824
IIS holds the files open as part of its caching mechanism. The slowest part of opening and reading a file is the initial open. Thus if you keep it open then the imrpoves performance slightly.

In case you are going to ask can you turn this off. The answer is no. However you can normally overwrite or truncate the files without this happening so if the problem is in your CGI deleting before writing new versions try changing it to truncate instead.


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question