Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A seemingly working solution for the latter of the two problems above (the <code>HTTP could not register URL</code> one) can be found in the <a href="http://www.microsoft.com/download/en/details.aspx?id=23507" rel="nofollow">VS2010 Training Kit</a> posted in the comments of Gabobcat's answer (by him).</p> <p>In the 4th exercise, "Ex4-ServiceDiscovery", you are given what appears to be a chat application that uses WCF services to communicate between two clients. It uses a discovery feature to find peers on the network. Long story short, the same exception occurs when you initially try running the completed application (after filling in the discovery events as laid out in the exercise). Bundled with the Training Kit is a couple of batch scripts (which AFAICT uses Microsoft's "open source" license so I should be able to share these scripts) to set or delete "URL ACLs". In practice, they appear to only be a single (useful) command:</p> <p>File: AddURLACL.cmd</p> <pre><code>@Echo Off @Echo Grant permissions for URL reservation @Echo Parameter 1 "%1" == port @Echo Parameter 2 "%2" == URL pause netsh http add urlacl url=http://+:%1/%2 user=%USERDOMAIN%\%USERNAME% </code></pre> <p>File: DelURLACL.cmd</p> <pre><code>@Echo Off @Echo Deletes permissions for URL reservation @Echo Parameter 1 "%1" == port @Echo Parameter 2 "%2" == URL pause netsh http delete urlacl url=http://+:%1/%2 </code></pre> <p>Obviously, the <code>netsh</code> commands are the only ones that matter. The example project has you use the following command (from a "Run as Administrator" Command Prompt window) to "fix" this exception:</p> <pre><code>C:\VS2010TrainingKit\Labs\WhatsNewInWCF4\Source\Setup\AddURLACL.cmd 8000 </code></pre> <p>(I used the absolute path just to show you where in the Training Kit you could find these scripts; personally I was in the WhatsNewInWCF4\Source directory when I did this)</p> <p>The string 8000 only occurs 1 time throughout this project:</p> <pre><code>C:\VS2010TrainingKit\Labs\WhatsNewInWCF4\Source\Ex4-ServiceDiscovery\Begin\C#&gt;findstr /n /s "8000" * DiscoveryChat\SimpleChat.cs:376: this.localAddress = new Uri("http://localhost:8000/" + Guid.NewGuid().ToString()); </code></pre> <p>It appears that port 8000 is the port that the chat clients are trying to launch a service host on (don't ask me how they all share it...I assume that the <code>ServiceHost</code> class they use is intelligent enough to reuse an existing service...).</p> <p>I haven't experimented thoroughly with this yet, but it seems to have "fixed" my EvalService project (when I changed the port to 8000). That is currently with most endpoints removed (only the <code>basicHttpBinding</code> endpoint left) and the <code>baseAddress</code> set to <code>localhost:8000</code>.</p> <p>Let me know if this works for you too.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload