Note that there are some explanatory texts on larger screens.

plurals
  1. POcalling WCF client function doesn't work on IIS
    primarykey
    data
    text
    <p>I made a service using the WCF discovery. Everything works fine when it is deployed on a specific port (using VS2010 debug), but when I try to deploy it to IIS it finds the service but can't run any of the methods.</p> <p>This is the code:</p> <pre><code> DiscoveryClient discoverclient = new DiscoveryClient(new UdpDiscoveryEndpoint()); FindResponse response = discoverclient.Find(new FindCriteria(typeof(IService))); EndpointAddress address = response.Endpoints[0].Address; ServiceClient client = new ServiceClient(new BasicHttpBinding(), address); Console.WriteLine(client.getMsg()); //some test function Console.ReadKey(); </code></pre> <p>When tring to run the <code>client.getMsg()</code> method I get the following error:</p> <blockquote> <p>EndpointNotFoundException:<br> There was no endpoint listening at <a href="http://computerName.domain/services/Service.svc" rel="nofollow">http://computerName.domain/services/Service.svc</a> that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.</p> </blockquote> <p>But I got the address, meaning it found it. And if I use the debug deployer (not to iis) I find it in <code>http://localhost:port/services/Service.svc</code> and it runs perfectly fine. How can I have it deployed to iis with no problems?</p> <p>OS : win7 64 bit</p> <p>config file : </p> <p> </p> <pre><code>&lt;services&gt; &lt;service behaviorConfiguration="RemoteDeploy.Service1Behavior" name="RemoteDeploy.Service"&gt; &lt;endpoint address="" binding="basicHttpBinding" bindingConfiguration="" contract="RemoteDeploy.IService"&gt; &lt;identity&gt; &lt;dns value="localhost" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;endpoint name="udpDiscoveryEpt" kind="udpDiscoveryEndpoint" /&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;/service&gt; &lt;/services&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="RemoteDeploy.Service1Behavior"&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt; &lt;serviceDiscovery&gt; &lt;/serviceDiscovery&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; </code></pre> <p></p>
    singulars
    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. 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