Q: Changing app.config from another application I made an application that is able to change its app.config (the connection string part). I tried several solutions and this proved to be the easiest way to solve one of my problems. This is the code I use:
ConnectionStringSettings postavke = new ConnectionStringSettings("Kontrolor.Properties.Settings.KontrolorConnectionString", constring);
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.ConnectionStrings.ConnectionStrings.Clear();
config.ConnectionStrings.ConnectionStrings.Add(postavke);   

config.Save(ConfigurationSaveMode.Modified, true);
ConfigurationManager.RefreshSection(config.ConnectionStrings.SectionInformation.SectionName);

This code is placed inside a button_click method, and when I click that button and restart the application the changes are visible.
My question is this - is there a way to do it from another (independent) application that would enable the user to create the connection string by entering the required values into a textBox or selecting it from comboBox (he needs only to enter the IP of the server and the name of the database). By doing that, the first application would be preprepared and there would be no need to restart it to apply changes.
Is there a way to do this?

A: Since both applications are on same machine you can use simple windows messaging, register windows message in both applications and sender post message to receiver, here is the example code: 
Sender : 
  public partial class FormSender : Form
  {
    [DllImport("user32")]
    private static extern int RegisterWindowMessage(string message);

    private static readonly int WM_REFRESH_CONFIGURATION = RegisterWindowMessage("WM_REFRESH_CONFIGURATION");

    [DllImport("user32")]
    private static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam);

    public FormSender()
    {
      InitializeComponent();
    }

    private void btnNotify_Click(object sender, EventArgs e)
    {
      NotifyOtherApp();
    }

    private void NotifyOtherApp()
    {
      List<Process> procs = Process.GetProcesses().ToList();
      Process receiverProc = procs.Find(pp => pp.ProcessName == "Receiver" || pp.ProcessName == "Receiver.vshost");  
      if (receiverProc != null)
        PostMessage((IntPtr)receiverProc.MainWindowHandle, WM_REFRESH_CONFIGURATION, new IntPtr(0), new IntPtr(0));
    }
  }

Receiver : 
 public partial class FormReceiver : Form
  {
    [DllImport("user32")]
    private static extern int RegisterWindowMessage(string message);

    private static readonly int WM_REFRESH_CONFIGURATION = RegisterWindowMessage("WM_REFRESH_CONFIGURATION");

    public FormReceiver()
    {
      InitializeComponent();
    }

    protected override void WndProc(ref Message m)
    {
      if (m.Msg == WM_REFRESH_CONFIGURATION)
      {
        lblMessageReceived.Text = "Refresh message recevied : " + DateTime.Now.ToString();
      }
      else
      {
        base.WndProc(ref m);
      }
    }
  }

btw. note that I am checking for process name "Receiver.vshost" so that it can work when started in VS debugger
