Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to keep IIS from locking files?

Posted on 1998-05-04
2
Medium Priority
?
297 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 300 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

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…
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

718 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