How to not get "ERROR_FILE_IN_USE" error when deploying ASP.NET Core website using FTP/Shared folder?


dfmetro

I have a web application that ASP.NET Core RTMtargets.net framework 4.52

in myproject.json

"frameworks": {
    "net452": {}
  },

When I publish it to a folder it creates one MyWebApplication.exeand when I access the app in a browser the exe runs.

I need to publish the site to have Windows Server 2012andIIS8

I can access the website deployment directory through the VPN shared folder.

The first time I publish the site to that folder it works fine. I visit the website's url and it loads the website. However, when I want to republish the site after making changes and copying the files, it tells me it MyWebApplication.exe's in use and the publish fails.

The only way I know how to fix this is to kill MyWebApplication.exethe task manager on the web server before publishing. However, since I can only access the server through a shared directory, this is not possible.

Using the ASP.NET 4website, I don't have this problem.

ASP.NET CORE RC1No problem with me either, dnxalthough using HTTPPlatformHandlerit allows me to copy sites without having to kill dnx.exe. I just need to touch web.configand the site restarts.

my question is:

  1. Is there a way to copy/publish a new changed version of an already deployed site (via FTP or via shared folder access)?

  2. Is there a way to stop the website, e.g. from unloading MyWebApplication.exefrom memory on the web server via FTP or shared folder access ?

Developer

The ERROR_FILE_IN_USEbug is an open issue on github

Just delete the publish directory of the web.config before publishing.

A site without a web.config will automatically stop and unload the file from memory, and will prevent anyone from accessing the URL again to load the site into memory.

Another workaround is to copy an app_offline.htm into your publish directory which should also work fine. association

Related


502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la

502.5 error when deploying asp.net core website using IIS

Tori E I have an ASP.NET Core 1.0 application that has been successfully deployed and running on a pre-production server for several months. Today I tried to deploy the website to our production server using this article as a guide : https://docs.asp.net/en/la