Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to deploy ASP.NET Core website to Azure without taking it offline?

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

like image 213
Pavel Chuchuva Avatar asked Oct 17 '22 23:10

Pavel Chuchuva


1 Answers

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.

like image 141
LiamHarries Avatar answered Oct 21 '22 03:10

LiamHarries