Note that there are some explanatory texts on larger screens.

plurals
  1. POConsuming a WCF Service that is hosted in a Windows Service from outside solution
    primarykey
    data
    text
    <p>I've set up a WCF Library hosted in a Windows Service using the following walk-through:</p> <p><a href="http://msdn.microsoft.com/en-us/library/ff649818.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/ff649818.aspx</a></p> <p>The consumer winforms is in the same solution, which is located locally on my work PC's C: drive.</p> <p>The walk-through works i.e. the winforms button gives me the correct answer.</p> <p>If I create a new Solution on the C-Drive with a single Windows Forms project in it I cannot successfully add a <code>service reference</code> to this running service, i get the following message:</p> <p><img src="https://i.stack.imgur.com/OoZJe.png" alt="enter image description here"> </p> <p>The detailed message says the following:</p> <blockquote> <p>The URI prefix is not recognized. Metadata contains a reference that cannot be resolved: 'net.tcp://localhost:8526/Service1'. Could not connect to net.tcp://localhost:8526/Service1. The connection attempt lasted for a time span of 00:00:02.0020000. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8526. No connection could be made because the target machine actively refused it 127.0.0.1:8526 If the service is defined in the current solution, try building the solution and adding the service reference again.</p> </blockquote> <p>Why can I add this Service Reference ok to a project within the same Solution as the Service but not from a project in a different solution?</p> <hr> <p><strong>EDIT</strong> </p> <p><strong>My colleague found an error in the MSDN article - I have detailed his find <a href="https://stackoverflow.com/questions/12761107/an-error-in-the-msdn-walk-through-how-to-host-wcf-in-a-windows-service-using">HERE</a></strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    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