Note that there are some explanatory texts on larger screens.

plurals
  1. POno endpoint listening at local host
    primarykey
    data
    text
    <p>I get an error on the client for my wcf service hosted by my console app. Now this works within my browser but not in my win forms which is a simple button textbox and label:</p> <pre><code> public ServiceReference1.Service1Client testClient = new ServiceReference1.Service1Client(); private void button1_Click_1(object sender, EventArgs e) { label1.Text = testClient.GetData(Convert.ToString(textBox1.Text)); } </code></pre> <p>The error I get is:</p> <blockquote> <p>There was no endpoint listening at <a href="http://localhost:8000/hello" rel="nofollow">http://localhost:8000/hello</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>Host console app code:</p> <pre><code>class Program { static void Main(string[] args) { WebHttpBinding binding = new WebHttpBinding(); WebServiceHost host = new WebServiceHost(typeof(Service1)); host.AddServiceEndpoint(typeof(IService1), binding, "http://localhost:8000/hello"); host.Open(); Console.WriteLine("Hello world service"); Console.WriteLine("Press &lt;RETURN&gt; to end service"); Console.ReadLine(); } } </code></pre> <p>Client App.cofig file code:</p> <pre><code>&lt;configuration&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;customBinding&gt; &lt;binding name="WebHttpBinding_IService1"&gt; &lt;textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Soap12" writeEncoding="utf-8"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;/textMessageEncoding&gt; &lt;httpTransport&gt;&lt;/httpTransport&gt; &lt;/binding&gt; &lt;/customBinding&gt; &lt;wsHttpBinding&gt; &lt;binding name="WSHttpBinding_IService1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="Message"&gt; &lt;transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /&gt; &lt;message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="http://localhost:8000/hello" binding="customBinding" bindingConfiguration="WebHttpBinding_IService1" contract="ServiceReference1.IService1" name="WebHttpBinding_IService1" /&gt; &lt;endpoint address="http://localhost:8732/Design_Time_Addresses/WcfServiceLibrary1/Service1/" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService1" contract="ServiceReference1.Service1" name="WSHttpBinding_IService1"&gt; &lt;identity&gt; &lt;dns value="localhost" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </code></pre>
    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.
 

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