Closed RavindraSolanki closed 6 years ago
I've made some changes to look the best of the two worlds.
For all the IIS actions run through Powershell.Deployments a mutex is used to synchronise the execution. However, I'm conscious something might happen outside Powershell.Deployment and a retry-mechanism is in place for this eventuality.
This pull-request mitigate the following issue. When installing or uninstalling a site or a web app, IIS locks the 'applicationHost.config' file while it is writing in it. If multiple sites or web apps or appPools are being created or removed at the same time the operation might fail and an exception is returned.
This PR adds a retry mechanism as suggested in this thread. The Operation is tried a maximum of 5 times with a random wait time between each retry.
This PR adds some cosmetic changes: