Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF - There was no endpoint listening
    text
    copied!<p>One of my WCF Services has an operation contract taking a large sized file as a parameter. So, when the client tries to send this over, I got an exception and when I looked at the server trace this is what I saw:</p> <blockquote> <p>MESSAGE: The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.</p> </blockquote> <p>I was using the default simplified configuration for my WCF services, so added a new service definition as follows:</p> <pre><code>&lt;system.serviceModel&gt; &lt;services&gt; &lt;service name="MyNamespace.MyService"&gt; &lt;endpoint address="MyService.svc" binding="basicHttpBinding" bindingConfiguration="basicHttp" contract="MyNamespace.IMyService" /&gt; &lt;/service&gt; &lt;/services&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="basicHttp" allowCookies="true" maxReceivedMessageSize="10485760" maxBufferSize="10485760" maxBufferPoolSize="10485760"&gt; &lt;readerQuotas maxDepth="32" maxArrayLength="10485760" maxStringContentLength="10485760"/&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;behaviors&gt; ... &lt;/behaviors&gt; &lt;protocolMapping&gt; ... &lt;/protocolMapping&gt; </code></pre> <p></p> <p>The way I consume my services is, I have a function returning a channel in my helper class, and I use that channel to call the operations:</p> <pre><code>public static T CreateChannel&lt;T&gt;() where T : IBaseService { System.ServiceModel.BasicHttpBinding binding= new System.ServiceModel.BasicHttpBinding(); binding.TransferMode = TransferMode.Streamed; binding.Security = new BasicHttpSecurity() { Mode = BasicHttpSecurityMode.None }; binding.MaxReceivedMessageSize = 10485760; binding.MaxBufferSize = 10485760; System.ServiceModel.ChannelFactory&lt;T&gt; cf2 = new ChannelFactory&lt;T&gt;(binding, new System.ServiceModel.EndpointAddress(MyEndpointAddress)); //I checked this part, the address is correct. T Channel= cf2.CreateChannel(); return Channel; } </code></pre> <p>and then, </p> <pre><code>var businessObject = WcfHelper.CreateChannel&lt;IMyService&gt;(); var operationResult = await businessObject.MyOperationAsync(...); </code></pre> <p>Even though, my other services are running correctly, the one I defined in the configuration explicitly returns an exception of <em>"There was no endpoint listening..."</em> I am developing on VS2012, using IISExpress. What may be the problem, any suggestions?</p>
 

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