title: WCF Service Host Configuration - Please try changing the HTTP port to 8732
body: <p>I had a complex WCF service based solution working on my PC but due to a problem installing Windows 8.1 I had to 'Refresh' my PC. Now that I've reinstalled Visual Studio 2012 my project no longer functions correctly.</p>
  
  <p>When I debug a unit test the wcfservicehost displays an error:</p>
  
  <pre><code>Please try changing the HTTP port to 8733 or running as Administrator.
  System.ServiceModel.AddressAccessDeniedException: HTTP could not register URL http://+:8732/Design_Time_Addresses/MyWCFService/Name/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details). ---&gt; System.Net.HttpListenerException: Access is denied
  </code></pre>
  
  <p>Apparently the usual solution to this is to run Visual Studio as administrator (possibly because it then overwrites something somewhere) however I'm unable to do this as I'm required to reference DLLs on a network drive and network drives cannot be accessed when you run as administrator.</p>
  
  <p>I'm assuming that somewhere there is a configuration file or registry entry that determines which port Visual Studio or the WCF Service Host uses when running and that there is a leftover entry in there from my previous Windows installation.</p>
  
  <p>To change the port to 8733 would require editing every service, re-referencing them and then rebuilding the solution and hoping that it works.</p>
  
  <p>Is there a way to set or force the port that WCF Service Host uses?</p>