Solved

How to keep IIS from locking files?

Posted on 1998-05-04
2
282 Views
Last Modified: 2013-12-19
IIS (4.0) under Windows NT server 4.0 seems to lock html files after each read.  It seems to unlock them after some time.  Is there a way to prevent this locking to occur?

What I have found/read up to now:
If I stop and restart IIS, all files are now unlocked.

It doesn't seem to lock ASP files.  But it isn't a good solution to use ASP files instead of html because of speed (ASP files need to be parsed).  

The lock seem to be a read lock because some program are able to write over the file but some aren't.  (Maybe these programs look for a lock instead of a write lock).  

Someone tell to try changing this registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\GlobalExpire=??? to 0.  It said this worked for IIS 3.0 but this don't work for 4.0.

Programs that seem affected by this lock:
VisualSourceSafe (shadow folder)
TextPad (told by a friend)

Programs unaffected by this:
Notepad
VisualInterDev (told by a friend)
0
Comment
Question by:savardd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 100 total points
ID: 1560667
It's a bug in IIS4.
MS states the solution is to add DisableMemoryCache with value 1 to the registry.
(so not GlobalExpire)

In some cases that is still not enough. I "fixed" the problem then by forcing IIS to treat .htm and .html files as ASP. (ASP-files do not have the problem)

Since I don't have IIS4 at hand right now, I can't tell you exactly how to do that. But you can define which dll's IIS should use in handling files of a certain extension. There is a standard list, including a.o.
.asp handled by path\ASP.DLL
.asa handled by path\ASP.DLL
.stm handled by path\SSI.DLL
etc

I added ,htm and .html to this list and said it should be handled by asp.dll. It worked.

Of course it will have some impact on the performance of the server. Just as the DisableMemoryCache will have.



0
 

Author Comment

by:savardd
ID: 1560668
In the meantime, I found a way to resolve this problem.  There is
a registry entry:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters\ObjectCacheTTL  (Dword)

that keep the number of second to keep files open (locked).  By
setting it to 0, this disable this cache.


 ObjectCacheTTL       0x1E       0=IIS does not cache.
                                   30 seconds 0x1-0x7FFFFFFF
                         is the                                  
                                 maximum time an inactive
                                 object can remain in cache.
                                 0xFFFFFFFF=An object
                                 remains in cache until it is
                                 overwritten.


Thanks
0

Featured Post

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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