简体   繁体   中英

How to upload my publisher file without stopping IIS in ASP.NET Core?

When uploading the ASP.NET Core publish file to a server error using another process, and when stopping, IIS allows uploading my file.

How to upload my publisher file without stopping IIS?

Based on this issue here: https://github.com/aspnet/IISIntegration/issues/238

If you are publishing to an IIS server, have you tried using the MSDeploy profile instead of FileSystem? If it is an MSDeploy profile, you can set the following property in the pubxml (under Properties\\Publish Profiles)

<EnableAppOffline>true</EnableAppOffline>

This will take care of bringing the site down before publishing. You should not run into issues with deleting files with this profile.

Publishing to a folder does not know if it is getting published to a live site or just a folder on the machine. Hence, it does not handle stopping the site before publishing. MSDeploy profiles are specifically meant to handle these scenarios (publishing to IIS etc).

Unfortunately, it seems that there is no way to patch dlls without restarting the app pool yet.

If you don't want to stop iis then you could try to recycle the iis application pool which is used by the web application you are trying to redeploy.

  • Open IIS Manager
  • Right-click the AppPool
  • Choose the recycle option from the action

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM