I’m having an issue that I have not encountered before where App.configs for Windows Services that are installed under the “Program Files (x86)” directory are locked for editing even when the Windows Services are not running. I get a message that the file is in use, even when it should not be.
- Is this something specific about putting a .config file for a Windows Service under the Program Files directory?
- How can I allow a user that knows the location of the .config file to edit it in Notepad or another editor without receiving the file is “in use” message.
I have tried the install of the Windows Service on three different machines and ensured the service is not actually started/running. I’m hoping to gain some knowledge on why this is not working as in the past I have had app.configs editable for .exes that happen to live in a directory.
It might happen because the file is write protected, you should right click on it (or it’s containing folder), choose properties, and under security, add your user full control over this file. just make sure not to create a security breech in your application by adding full control to all users.
You can also try opening the file with right-click -> Run as Administrator, it might do the trick.