550 The process cannot access the file because it is being used by another process
As the error message prompts, you can close WebAPI first, and then
republish.
Best Regards,
YihuiSun
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
More likely the file is deleted right after the build but before it is published. I would try "by hand" first and automate later but more likely:
- make sure app_offline.htm is published first
- then publish all other files
- and then remove app_offline.htm
"Take Application Offline: Select the option to take the Web App offline by placing an app_offline.htm file in the root directory of the Web App before the sync operation begins. The file will be removed after the sync operation completes
successfully."
Member
4 Points
32 Posts
I am getting a error uploding to ftp server
Dec 26, 2020 12:05 PM|alya14|LINK
hi;
I am working on .Net Core 3.1 ,I published the api to host and when I tested everything looks good
I added the some features and try to upload by ftp ,it was return a error like below
550 The process cannot access the file because it is being used by another process.Maybe it will fix by restarting to iis But problem will continue
I think I missed the some features ,maybe its dispos or else .
Contributor
2400 Points
692 Posts
Re: I am getting a error uploding to ftp server
Dec 28, 2020 09:50 AM|YihuiSun|LINK
Hi alya14,
As the error message prompts, you can close WebAPI first, and then republish.
Best Regards,
YihuiSun
Member
4 Points
32 Posts
Re: I am getting a error uploding to ftp server
Dec 28, 2020 10:26 AM|alya14|LINK
its easy to in local iis,it was harder to do on hosting,I shouldn't always ask the support team for help,please restart the pool or iis,its comic
All-Star
48320 Points
18004 Posts
Re: I am getting a error uploding to ftp server
Dec 28, 2020 10:34 AM|PatriceSc|LINK
Hi,
Using App Offline file (app_offline.htm) | Microsoft Docs could be another option to gracefully shutdown the site. Some hosting services have also support for Web Deploy and more to have this done for you.
Member
4 Points
32 Posts
Re: I am getting a error uploding to ftp server
Dec 28, 2020 12:17 PM|alya14|LINK
hi , I can't apply to that artice due to I am away from hosting server
also I added the below code but nothing change.
<div> </div>All-Star
48320 Points
18004 Posts
Re: I am getting a error uploding to ftp server
Dec 28, 2020 01:10 PM|PatriceSc|LINK
More likely the file is deleted right after the build but before it is published. I would try "by hand" first and automate later but more likely:
- make sure app_offline.htm is published first
- then publish all other files
- and then remove app_offline.htm
If you have a "Web Deploy" option available it should do that for you. On my side I'm using azure-pipelines-tasks/Tasks/IISWebAppDeploymentOnMachineGroupV0 at master · microsoft/azure-pipelines-tasks · GitHub which uses Web Deploy behind the scene:
"Take Application Offline: Select the option to take the Web App offline by placing an app_offline.htm file in the root directory of the Web App before the sync operation begins. The file will be removed after the sync operation completes successfully."