Wednesday, May 9, 2018

Setting a proxy for a standalone Microsoft .Net application

  1. Find the applications install location (or .exe location). If you are using a shortcut, you can right click, and check the properties to find this place.
  2. Locate your applications .config file. Typically this will be in the same folder as your .exe; For example, for myappname.exe, you should be able to see myappname.exe.config in the same directory
  3. Create one if there there is only not already present. Make sure to name it myappname.exe.config
  4. If creating a new file, Open the newly created file in notepad, and paste the below into it. Make sure to change proxyservernameproxyserverport in your environment
  5. if file already exists, add the defaultProxy section as shown below and save file
  6. Restart the application
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.net>
    <defaultProxy enabled="true" useDefaultCredentials="true">
      <proxy proxyaddress="http://proxyservername:proxyserverport/" bypassonlocal="false" usesystemdefault="false" autoDetect="false" />
    </defaultProxy>
  </system.net>
</configuration>


No comments:

Turn on Windows 11 Fast Boot

If windows starting is slow, to enable windows 11 fast startup/boot,  Press Windows + R, type powercfg.cpl, and hit Enter.  This will direct...