How to get IIS7 to release a secured documents?

Throughout our manufacturing constructs, a large (10 megabyte) fixed web content documents in the origin directory site will certainly occasionally be secured by IIS and also can not be removed by the tidy job. This is probably due to the fact that it is being proactively offered to several customers at the time.

The construct procedure quits the internet site prior to cleansing using

c:\Windows\System32\inetsrv\appcmd.exe stop site http://oursite.com

However, this does not release the documents - we need to reactivate IIS to get the procedure to relinquish its lock.

appcmd.exe permits you to take IIS down entirely ; we do not intend to do this!

Exist otherwise to get IIS to allow go of a secured documents, without reactivating IIS? Merely quiting and also beginning the specific internet site is most definitely not functioning to release the documents lock.

0
2019-05-18 22:49:13
Source Share
Answers: 7

I make use of a little device called "Handle" to do this.

You primarily pass it the name of the documents that is secured and also it informs you what procedures are utilizing it:

handle c:\weird.file
Something.exe pid: 1000 100: C:\weird.file
Something.exe pid: 1000 101: C:\weird.file

Then you pass it the - c button to make it close the take care of:

handle.exe -c 101 -p 1000 -y
handle.exe -c 100 -p 1000 -y

You could battle to function that in to a construct manuscript without a wrapper program to parse the result yet with any luck this will certainly aid.

0
2019-05-22 22:39:15
Source

I'm not exactly sure if you suggest the collection of aspx files in short-lived settings up. We are making use of ASP.NET deployment projects, which precompile all aspx/ascx files ahead of time.

While replicating the binary files from the "release" to the "container" folder, we short-lived enable a app_offline. htm documents which is gotten rid of nevertheless settings up are replicated (simply a couple of secs). In this manner I never ever experienced documents locks.

EDIT:

You can attempt to reuse the application swimming pool making use of appcmd.exe, as opposed to quiting the internet site:

C:\Windows\System32\inetsrv\appcmd.exe recycle apppool "My App Pool Name"
0
2019-05-21 08:15:15
Source

Sure, stop the IIS solution. Possibly I'm not recognizing something, sorry.

0
2019-05-21 08:10:23
Source

note: not a specialist on windows submit securing semiotics

Jarrod, are you able to relabel the documents off the beaten track. You might additionally have the ability to create your new documents with a short-lived expansion, and afterwards relabel it over the existing documents.

If windows submit securing semiotics function comparable to POSIX ones the viewers that hold an existing read lock on the documents, need to still remain to offer the old documents till they close their read streams, while new viewers will certainly open the new documents.

0
2019-05-21 08:05:03
Source

There are devices, such as Sysinternal is Process Explorer, that can locate and also by force close documents takes care of, nonetheless the state and also practices of the application (both your own and also, in this instance, IIS) after doing this is undefined. Some will not care, some will certainly mistake and also others will certainly crash hard.

The proper remedy is to take the blackout and also permit IIS to easily release locks and also clean up after itself to maintain web server security. If this is not feasible, you can either create an additional website on the very same box, or set up a new box with the new web content, and also relocate the domain name name/IP throughout to "advertise" the new web content to manufacturing.

0
2019-05-21 07:58:49
Source

Process Monitor need to aid you with your examination, below is an example from Mark is blog site ( the individual that created the device) on just how to locate the documents take care of.

You might intend to attempt this Unlocker tool to automate your unlocking at a documents take care of degree.

0
2019-05-21 07:32:17
Source

Not the solution, yet a workaround suggestion in instance there is no other way to "unlock" that submit without reactivating IIS web server:

What if you build/deploy to an new vacant folder and also transform the internet site is residence directory site to that folder? You need to create an new folder name though or button in between 2 names.

I do not recognize in which folder that submit belongs. If it does not need to remain in the origin folder, you can place it in a freshly developed folder and also create a digital directory site indicating that folder. So you can maintain your typical residence directory site for the application.

0
2019-05-21 07:28:46
Source