Unable to replace HTML file in Web Application hosted by IIS 7.5 on Win
Server 2008 R2 due to locking IIS Worker Process
When attempting to delete/replace an entire .NET Web Application hosted by
IIS 7.5 on Windows Server 2008 R2, targeting .NET 4.5, programmatic
deletion of the landing page (an .html page) via VB.NET code results in
"System.IO.IOException: The process cannot access the file
'[filename].html'. because it is being used by another process"
Attempting to delete the HTML file using Windows Explorer results in
"The action can't be completed because file is open in IIS Worker Process."
This happens immediately after the landing page is served up by IIS. The
lock lasts for a while, approximately an hour or two. Recycling the App
Pool that hosts the application removes the lock immediately making
deletion possible. I can see the IIS Worker Process disappear via Process
Explorer after the recycle.
This is happening on multiple, redundant production servers but does not
happen on a comparable test server (very similar set up).
I've checked
Server setup and configuration (software installed, features installed,
.NET framework asp.config file, etc)
web.config file setups
IIS Application and App Pool configurations.
toggled application Output Caching Settings
There are a few similar questions to this posted but they have not helped
me resolve the issue.
Note that replacing the web application files is required as a business
need to host payment pages on behalf of customers. Because there are
multiple customers' web applications hosted on the same IIS instance,
restarting the instance is not an option. I'm not even comfortable
recycling the app pool in order to be able to publish one customer's
changes.
Thank you for taking the time to consider this post.
No comments:
Post a Comment