Jump to content

MsSense.exe is locking a PDF file causing a C# application running File.Delete() to hang indefinitely


Recommended Posts

Posted

We have a C# application which is calling File.Delete() to delete a file in the user's %localappdata% folder. The application is occasionally hanging indefinitely on that line of code when deleting PDF files.Using Handle (by Microsoft), it shows that both the application and MsSense.exe have a (RWD) handle on that file.File.Delete() should throw an exception if the specified file is in use but it should never hang indefinitely.Here is the snippet of code from the application:try { // Log entry which appears File.Delete(fileName); // Log entry which does not appear } catch

 

Continue reading...

  • Replies 0
  • Created
  • Last Reply

Popular Days

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...