I am really struggling finding a solution for running my c# WPF application as a standard user. I get a UAC dialog which pops up and asks for a User Name and Password.
Here is what I have done so far.
- Added a Manifest file to the application to the application with the following level. Also tried highestAvailable
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
Stripped back my application of anything that I thought may trigger the issue as previously it was writing Log Files (Log4Net) to a LogFiles directory under Program Files\My Application. The standard user does have access to the application directory (used to test as that user can create files and directories). For now I have no text file logging. I was also writing to the HLCU registry key but I have taken all of that out for testing even though I believe HKCU should not trigger the prompt.
Checked my application names etc for instances like setup, installer etc based on the reading I did on Heuristics Checks. All Fine.
The application is pretty stock standard. C# WPF Net Framework 4.5.1 DevExpress. Functionality is pretty much just a GUI that accesses a MySQL database and communicates with a Service on the network via TCP.
The one thing that is really strange is if I go into the .exe.config file of the application, put a space somewhere then save the file, When I open the application I don't get the UAC prompt. Restart the PC and log in as that user and I get the UAC Prompt. Cancel the prompt, run again and Get Prompt again (testing). Edit the config file again, put a space and then backspace and save. I open the application and I don't get a UAC prompt.
Its really starting to drive me nuts.
If anyone has any tips or pointers, it would be muchly appreciated.
Thanks,
Daniel.