none
w3wp.exe process locking the dss file, release the dss file without killing the process through c# code RRS feed

  • Question

  • Hello, 

    I am trying to unlock a file which is used by w3wp.exe(IIS process) process but I don't want to kill the process, only release a particular file used by that process, I want to implement it using c# code and not through the cmd. I have implemented handle but that did not help. Has any one been through this kind of situation? I do not want to reset the IIS process. 

    Friday, October 25, 2019 2:36 PM

All replies

  • Hello, 

    I am trying to unlock a file which is used by w3wp.exe(IIS process) process but I don't want to kill the process, only release a particular file used by that process, I want to implement it using c# code and not through the cmd. I have implemented handle but that did not help. Has any one been through this kind of situation? I do not want to reset the IIS process. 

    You kill the wpw3.exe that services the application pool that is hosting  all  ASP.NET Web programs the pool is hosting, then you terminate all Web programs the pool is hosting. 

    Wpw3.exe is only the ASP.NET Worker Process,  and it's locking nothing. It's a program running in the application pool the wpw3.exe is servicing that is locking something. 

    Maybe PE can help you identify who is the culprit. 

    https://download.cnet.com/Process-Explorer/3000-2094_4-10223605.html

    https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer

    Find yourself a tutorial on how to use PE.

    Friday, October 25, 2019 4:34 PM
  • Hello, 

    I am trying to unlock a file which is used by w3wp.exe(IIS process) process but I don't want to kill the process, only release a particular file used by that process, I want to implement it using c# code and not through the cmd. I have implemented handle but that did not help. Has any one been through this kind of situation? I do not want to reset the IIS process. 

    This sounds like the same issue raised in https://social.msdn.microsoft.com/Forums/en-US/e1cf39ef-b792-466b-89f9-a01792427890/release-a-file-lock-by-a-process-without-killing-the-process-abort-thread-may-be-an-option-i-tried?forum=csharpgeneral

    If the problem is in the file handling performed by a third-party dll then I suggest you pursue a solution with the author of that dll.

    • Proposed as answer by EckiS Friday, October 25, 2019 6:27 PM
    Friday, October 25, 2019 4:44 PM