Where is my application pulling its stale configuration information from?

52 Views Asked by At

I have a .NET application that saves its connection strings in the application configuration file. I updated the connection string and tried to deploy a new version, but no matter what I try it still seems to be reading the old information from somewhere. I've tried deleting the program files folder and the user config. Where is it still getting the old configuration information from?

1

There are 1 best solutions below

1
On BEST ANSWER

Unbeknownst to me, Windows 10 was storing my application's config file in C:\Users\myuser\appdata\local\VirtualStore\Program Files (x86)\My Company\MyProgram\MyProgram.exe.config. The key there being the VirtualStore folder. Since this application was written a while ago, it tries to write to the application config file in program files. Starting in Windows Vista, you couldn't do this anymore. Apparently in Windows 10, Windows tries to be helpful and actually lets you do it by virtualizing the call to the above folder.

So if your configuration file seems funky, you can check the above folder.