5
votes

When we try to deploy ASP.NET Core website to Azure we are getting this error:

Error Code: ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER More Information: Unable to perform the operation ("Delete File") for the specified directory ("D:\home\site\wwwroot\TestAspNetCore.exe"). This can occur if the server administrator has not authorized this operation for the user credentials you are using. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER.

The problem is IIS locks the .exe file. We can take the website offline but with continuous delivery it would be nice to have no downtime.

Note that ASP.NET 4.5 does not have this problem.

See also https://github.com/aspnet/IISIntegration/issues/226 and https://github.com/aspnet/Hosting/issues/141

1
when you publish to azure web app you get this error is it ?Aravind
a paraphrase for a song... "So many tears I've cried. So much pain inside"rgripper

1 Answers

3
votes

I've had a similar headache and it seems not to be possible, the most reliable solution I have come up with is to have 1 build for a private local version that can be taken offline then restarted right after deployment. I then have a second build that takes the private version into production every night in the early hours.

This way I can make updates regularly through the day and ensure my site is only offline for no more than 20s during the early hours when it is least likely to be used.