[英].net core file .exe is locked on server and could not be deleted
I Deployed a .net core 2.1 application on server with iis as a self contained application.我在服务器上部署了 .net 核心 2.1 应用程序,iis 作为自包含应用程序。
When i try delete all the files for deploy another version of this application, all files are deleted, except wwwroot folder and.exe file.当我尝试删除所有文件以部署此应用程序的另一个版本时,所有文件都被删除,除了 wwwroot 文件夹和 .exe 文件。
Both are delete but back to appear in the folder again.两者都被删除但又重新出现在文件夹中。
I' ve tryied stop the application and pool application on iis but it not work, and this files appear over and over again.我已经尝试停止 iis 上的应用程序和池应用程序,但它不起作用,并且这些文件一遍又一遍地出现。
How can i solve this problem?我怎么解决这个问题?
You can try the following.您可以尝试以下方法。
look for the <.exe> file you are trying to delete in the task manager.在任务管理器中查找您尝试删除的<.exe>文件。 if its there stop it and then try deleting your files.
如果它在那里停止它,然后尝试删除您的文件。
Look for dotnet.exe in task manager, if it is there, stop it, and then try to delete在任务管理器中查找dotnet.exe ,如果有,停止它,然后尝试删除
For me it was dotnet.exe that was causing the issue, and I had it resolved by stopping it对我来说,是 dotnet.exe 导致了这个问题,我通过停止它来解决它
Process monitor is a tool to monitor real-time file system.进程监控器是一种实时监控文件系统的工具。
https://docs.microsoft.com/en-us/sysinternals/downloads/procmon https://docs.microsoft.com/en-us/sysinternals/downloads/procmon
It will tell you who is read/write these files.它会告诉你谁在读/写这些文件。
I believe it will help you figure out who is locking this.我相信它会帮助你找出谁在锁定它。 Then you only have to stop related process and try todelete these files again.
然后您只需停止相关进程并再次尝试删除这些文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.