title: ClickOnce applications and Windows Firewall
body: <p>It appears to me that ClickOnce applications will not work smoothly with <a href="https://en.wikipedia.org/wiki/Windows_Firewall" rel="noreferrer">Windows Firewall</a>.</p>
  
  <p>I have been successfully using ClickOnce deployments for two years. This has hit a stumbling block now the enterprise has upgraded to Windows 7. Each user's configuration has changed:</p>
  
  <ul>
  <li>Windows Firewall is enabled on each user's machines </li>
  <li>Users do not have administrator privileges on their machines. </li>
  </ul>
  
  <p>Here's how ClickOnce works: Every time a ClickOnce application is updated, the executable file is copied to a new directory. This directory has a machine generated name. (For example it might deploy to "C:\Users\andrew.shepherd\AppData\Local\Apps\2.0\GTTG5EJB.AVG\jc69hir.e45\watershedclient.exe").</p>
  
  <p>Windows Firewall, by default, blocks applications from accepting incoming calls. However, when the application first attempts this, Windows Firewall pops up a dialog that allows <i>an administrator</i> to make an exception for the application, giving it the privileges it needs. </p>
  
  <p>The problem is, Windows Firewall stores the application record as the full file path. Each time a ClickOnce application is updated, it installs to a different directory. Therefore, Windows Firewall sees it as a whole new application. An administrator now has to configure the firewall for this update for every machine that it's updated on. This effectively defeats the whole reason why we use ClickOnce technology.</p>
  
  <p>This was <a href="http://connect.microsoft.com/VisualStudio/feedback/details/115799/prompted-for-windows-firewall-exception-with-clickonce-on-every-update" rel="noreferrer">flagged as an issue</a> in 2005, and Microsoft acknowledged the problem and admitted there was no solution.</p>
  
  <p>Has this problem been addressed?</p>