My WindowsForms application needs to access the Internet, but when I try to open a WebRequest the application crashes. I noticed when I run the application from a simple folder (My Documents for example) it works, but if I run from "Program Files" folder it doesn't. I know that the problem resides in the UAC permissions, but I don't understand why I cannot open a WebRequest in a application running from "Program Files".
There is any way to open a WebResquest from "Program Files" without the UAC permission elevation (using the manifest)?
Are you trying to save anything to the local folder where the app is running?
If your app is running from a folder under Program Files and you try to write to the directory where it is located, that might fail. The Program Files folder is one of the places UAC is required in order to write (I think).